Hi,

I've tried Googling around and looked through the knowledge base and haven't been able to come to a clear answer.

I'm looking to have a sensor running that looks at a handful of computers and red flag any that are currently on a lockscreen. They are production line computers that should be on 24/7.

I know I can monitor the event log, but I think that could get messy as it would have to prioritize unlocks against a lock event and differentiate the two.

Thanks!


Article Comments

Hi there,

You could create a scheduled task which executes a PowerShell Script that sends some information via HTTP to the HTTP Push Sensors:
https://www.paessler.com/manuals/prtg/http_push_data_sensor
https://www.paessler.com/manuals/prtg/http_push_data_advanced_sensor

The commandlet could look like this to send "locked" to PRTG:

Invoke-Webrequest -uri "http(s):yourprtg:PORT/SensorToken?content=<prtg><result><channel>Locked</channel><value>1</value><LimitMode>1</LimitMode><LimitMinError>0</LimitMinError></result><text>Workstation is locked!</text></prtg>"

For unlocked:

Invoke-Webrequest -uri "http(s):yourprtg:PORT/SensorToken?content=<prtg><result><channel>Locked</channel><value>0</value><LimitMode>1</LimitMode><LimitMinError>0</LimitMinError></result><text>Workstation is unlocked!</text></prtg>"

So basically when the Workstation is locked, the Script will send a "1" as value and as the "LimitMinError" is set to "0" you will receive an error. When the workstation is unlocked it will send a "0" as value and nothing will happen.

To create the Scheduled Task simply create one for the trigger "On Workstation Lock" and one for "On Workstation unlock" which will trigger the scripts.

Best regards.


Apr, 2018 - Permalink