How can I monitor the number of users logged in to Windows? PRTG

por | 16 enero, 2020

https://kb.paessler.com/en/topic/69346-how-can-i-monitor-the-number-of-users-logged-in-to-windows

This article applies to PRTG Network Monitor 16.2.23 or later

Monitoring the Number of Logged in Windows Users

The Windows Logged In Users sensor is one of the sensor types that we remove in context of the The PRTG Sensor Cleanup. You could use this sensor to monitor the number of users logged in to a Windows device. As of PRTG version 16.2.23 you cannot add this sensor anymore and running Windows Logged In Users sensors are removed from PRTG with version 16.x.25.

Although this sensor type is not available out of the box anymore, you can still monitor the number of logged in users on a Windows computer with a custom sensor. Please download it from PRTG Tools Family and add it to your PRTG installation.

Requirement: .NET Framework

This sensor type requires the Microsoft .NET Framework to be installed on the computer running the PRTG probe: either on the local system (on every node, if on a cluster probe), or on the system running the remote probe. The required .NET version is .NET 4.0 (Client Profile is sufficient), .NET 4.5, or .NET 4.6. For more information, please see this article. Please additionally install .NET 3.5 on the probe system if the sensor shows an error.

Steps to Go

  1. Download PTF.UserLoggedin.zip from PRTG Tools Family.
  2. Extract the ZIP-file and copy UserLoggedin.exe into the \Custom Sensors\EXE subfolder of your PRTG installation and on the computers on which you run remote probes.
  3. Add an EXE/Script sensor to your PRTG installation.
  4. In sensor settings section EXE/Script choose the file UserLoggedin.exe
  5. In the Parameters field specify the following parameters:
ParameterDescription
-c=computerThe IP address or hostname of the computer that you want to monitor.
-u=usernameOptionally define the name of the user account that has access to the computer via WMI service.
-p=passwordOptionally define the password or passhash of the user account that has access to the computer via WMI service.
-f=filterOptionally define a filter to not or only count the users specified (comma separated list).
-fxOptional switch which defines that users in the filter are not counted (default).
-fiOptional switch that defines that only users in the filter are counted.
-xuOptional switch that defines that the number of users logged in is shown instead of their names.

Save the settings to start monitoring the number of users logged in on the target Windows device.


Alternative: UsersLoggedinXML Sensor

The UsersLoggedin sensor we describe above is basically the same sensor as the deprecated Windows Logged In Users sensor that used to be available as native sensor type in PRTG. Moreover, PRTG Tools Family provides an XML version of this sensor type.

This custom sensor retrieves the user accounts logged in to a Windows computer and parses this data as multi-channel result to an EXE/Script Advanced sensor in PRTG. It creates one channel for every user who has logged in, or you can monitor only specific user accounts. See PRTG Tools Family for more information about this sensor.

You can download the UsersLoggedinXML sensor here: