You are here: Monitor your network > Custom monitoring services > WMI-based custom monitoring services

Create WMI-based custom monitoring services

WMI (Windows Management Instrumentation) is an implementation of the Web-Based Enterprise Management (WBEM) standard. It provides an access mechanism to a vast collection of Windows management data and methods on Windows Servers and Windows Workstations.

Many of the services N-central is set up to monitor use WMI queries to collect performance information or asset information from Windows devices. If, however, there is something you want to monitor that is not included in a built-in service, and it is stored in WMI, you can create your own WMI-based service.

Creating WMI-based services requires knowledge of how the WMI protocol works, and you should refer to the Microsoft Developers' Network online library documentation about WMI for further information. The following gives a very simple example which checks that the Browser service is started and retrieves information about it.

1. At the SO level, go to Administration > Service Management > Custom Services.
2. Click Add > Services > and select WMI (Window Workstations and Windows Servers).
3. Enter a Name and Description for this service.
4. On the Queries tab, click Add to open the Add Query window.
5. Enter "Win32_Service" in the box after Select From WMI Class.
6. You now need to add the Win32_Service properties that you want to access:
a. Double-click LoadPercentage1 and change to the first property that you want to monitor. In case, enter "Started".
b. Click the blue plus (+) button after Select. This will add a LoadPercentage2 property. Change this to "Status".
c. In the same way, add "Description".

7. Now set the constraint, so that this information is only retrieved where the service name is "Browser":
a. Click the blue plus (+) button after Where.
b. Double-click Deviceid1 and change to "Name".
c. Double-click CPU1 and change to "Browser".

d. Click Save.

In other words, we have created a SELECT statement to retrieve the Started, Status, and Description values WHERE the service Name is Browser.

8. On the Data and Thresholds tab, click Add Metric. We now need to say how we want to handle this information.
a. Enter the name you want to give the first metric. Enter "Browser Started".
b. For Variable to Use, select $Started.Win32_Service.root\cimv2.
c. For Data Type, select Boolean.

d. Click Save.
e. Now repeat for Status and Description, using String as the Data Type.
9. Click on Configure Thresholds for the Browser Started metric in the Action column.
10. Select Failed from the If Test returns False, Display State As drop-down menu.
11. Select Normal from the If Test returns True, Display State As drop-down menu.

12. Click Save.
13. If you want to set the scanned frequency for this service, you can do so on the Schedule tab. This can be from every minute to once a month.
14. Click Save again.

You have now created a very simple WMI service. You can now add this service to a template or to any Windows server or workstation as described in Apply custom monitoring services.

 

 


For further product information and training, visit the N-able Resource Center.

Copyright 1990-2016 SolarWinds N-able. All Rights Reserved.