I am working on a sensor to monitor what user is logged into a pc. Originally I thought using wmic to query username currently logged in, but PRTG cannot handle a returned text value. Tried using powershell to check event logs and it only shows the event ID count. The logs show part of the message but cannot view the whole message to see what user logged in.

Has anyone tried to create a sensor for this purpose and if so would you give me advice on how you made it work? Thank you.


Article Comments

Hello mtngoat,
Thank you very much for your post. Please refer to this knowledge base article on how to monitor the logged in users on a specific machine.

Please download the "UsersLoggedinXML" custom sensor here and extract the UsersLoggedinXML.exe.exe file to "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML" on the PRTG Core Server as well as the Probes, the sensor is deployed to.

Create a new EXE/Script Advanced sensor on the machine, you'd like to monitor. Please choose "UsersLoggedinXML.exe" from the drop down field "EXE/Script" and set at least the following parameter:

"-c=%computername%"

Further parameters can be found in the above linked knowledge base article.

Kindly note, that depending on your operating system, also default system users such as "DWM-1" on e.g. Windows 8 can be shown. You can use the sensor-based filter parameters to hide those default users.

Best regards,
Sebastian


May, 2017 - Permalink