What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Sensor for current status of Windows (locked, unlocked)

Votes:

0

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!

lockscreen prtg windows

Created on Apr 27, 2018 3:15:35 PM



1 Reply

Votes:

0

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.

Created on Apr 30, 2018 12:15:50 PM by  Dariusz Gorka [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.