1. Support
  2. Knowledge base
  3. Infra
  4. Devices and sensors
  5. Using WMI to monitor Windows services

Using WMI to monitor Windows services

You can use Uptrends Infra to watch the state of any Windows Service. This allows you to monitor that particular services are still running on your Windows server or PC, including IIS/WWW services, SQL Server Agent service, SMTP service or any other service you installed, or that was already part of the operating system.

Adding a WMI sensor

The following instructions show how to use the built-in WMI sensor to retrieve and monitor the running state of a service on a Windows machine.

  1. Make sure that a device has been defined for the machine you want to monitor. Navigate to that device via the Infrastructure > Device list menu option.
  2. Click the Add sensor button at the top right corner to add the new sensor.
  3. The Add new sensor dialog appears. Select the Generic WMI sensor type in this dialog and click Add sensor.
  4. On the Create sensor form, go to the Sensor properties tab to fill in the following properties:
    • WMI script: Select * from Win32_Service Where Name ='<service name>' AND State LIKE 'Running' (replace <service name> with the name of the service to monitor)
    • WMI Mode: COUNT
    • Description and Display name: Names that help you identify the sensor
    • Value too low error level: 1
    • Format: N0
  5. Click the Save button to save the sensor. Measurements should start to come in after roughly one minute.

Looking at the sensor results

To inspect the results for the new sensor, go to Dashboards > Device overview and click on the appropriate device. The Status tile should now display a result for the sensor you just created. If you see the value “1”, this means that the Windows Service is running correctly.


These instructions only apply if you want to measure the state of a Windows Service running on the same machine as the Uptrends Infra agent. If you want to measure Windows Services on a different machine, you will need to configure that machine to allow WMI queries from the agent machine. Please contact our Support department for more information on that topic.

By using the Uptrends website, you consent to the use of cookies in accordance with our Cookie Policy.