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

Monitor logged in Windows User

Votes:

1

We currently require a user to be logged in all the time to a windows system, is it possible to monitor if that user is logged on and alert should it not be?

Many Thanks

Dave

logged-in prtg user windows

Created on Jul 27, 2010 2:39:32 PM

Last change on Aug 23, 2010 8:55:27 AM by  Daniel Zobel [Product Manager]



Best Answer

Accepted Answer

Votes:

1

PTF UserLoggedin

With Custom Sensor PTF UserLoggedin you can check if a specified user is loggedin or not loggedin on a computer.

Basically this sensor gets the number of users that are loggedin on a computer directly or via a RDP session.

You can optionally provide a comma seperated list of users to check if a specific user is loggedin or not loggedin.

-c=computer -u=username -p=password|passhash [-f=filter][-fx] [-fi]

-c=computer        The ip-address or hostname of the computer to monitor.
-u=username        The name of the user account that has access to the computer via WMI service.
-p=password        The password or passhash of the user account that has access to the computer via WMI service.
-f=filter          Optional filter to not or only count the users specified (comma seperated list).
-fx                Optional switch, users in the filter are not counted (default).
-fi                Optional switch, only users in the filter are counted.

To check if user Mike is loggedin on computer 192.168.1.1 :

UserLoggedin -c=192.168.1.1 -u=domain\user -p=password -f=mike -fi

The sensor will now return 1 if Mike is loggedin and 0 if anyone else or nobody is loggedin.

As user credentials cannot be used for local connections, to run the sensor against the local machine (probe), simply do not supply the username and password.

UserLoggedin -c=192.168.1.1 -f=mike -fi

The Custom Sensor can be downloaded from this page.

Created on Jul 31, 2010 5:44:57 PM

Last change on Feb 14, 2011 10:40:51 AM by  Daniel Zobel [Product Manager]



5 Replies

Votes:

0

This isn't possible "out of the box." One possibility would be write your own custom sensor. Please have a look at the Custom Sensors section of the user manual.

Created on Jul 28, 2010 7:58:16 AM by  Patrick Hutter [Paessler Support] (7,225) 3 3



Accepted Answer

Votes:

1

PTF UserLoggedin

With Custom Sensor PTF UserLoggedin you can check if a specified user is loggedin or not loggedin on a computer.

Basically this sensor gets the number of users that are loggedin on a computer directly or via a RDP session.

You can optionally provide a comma seperated list of users to check if a specific user is loggedin or not loggedin.

-c=computer -u=username -p=password|passhash [-f=filter][-fx] [-fi]

-c=computer        The ip-address or hostname of the computer to monitor.
-u=username        The name of the user account that has access to the computer via WMI service.
-p=password        The password or passhash of the user account that has access to the computer via WMI service.
-f=filter          Optional filter to not or only count the users specified (comma seperated list).
-fx                Optional switch, users in the filter are not counted (default).
-fi                Optional switch, only users in the filter are counted.

To check if user Mike is loggedin on computer 192.168.1.1 :

UserLoggedin -c=192.168.1.1 -u=domain\user -p=password -f=mike -fi

The sensor will now return 1 if Mike is loggedin and 0 if anyone else or nobody is loggedin.

As user credentials cannot be used for local connections, to run the sensor against the local machine (probe), simply do not supply the username and password.

UserLoggedin -c=192.168.1.1 -f=mike -fi

The Custom Sensor can be downloaded from this page.

Created on Jul 31, 2010 5:44:57 PM

Last change on Feb 14, 2011 10:40:51 AM by  Daniel Zobel [Product Manager]



Votes:

0

This works a treat!, Many many thanks for this, what a great forum :).

Reagrds

Dave

Created on Aug 2, 2010 10:42:16 AM



Votes:

0

Many thanks for the PRTG Addon's site over at Google! I am using several from there now, including this one.

I do have an issue with this sensor running against the probe server itself - it gives a message about "0:User credentials cannot be used for local connections"

I'm using the following parameters in this sensor (as well as the other similar sensors): -u=domain\user -p=passwordhash -c=%host (actual domain\user and passwordhash have been removed here). I get the same message if I run the exe directly on the server in question.

Created on Aug 3, 2010 6:54:09 PM



Votes:

1

Hi IT Jockey,

That is a good one, I had been so busy to querie a remote machine that I'd forgotten that user impersonation cannot be used for a local machine.

This is now fixed in version 1.0.2 of PTF UserLoggedin.

Running the sensor agains the local machine (probe), simply do not supply the username and password.

UserLoggedin -c=192.168.1.1  -f=mike -fi

(I also updated the original post to state this)

Created on Aug 5, 2010 2:52:27 PM




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.