WMI Service Detector

The WMIDetector detects the availability of WMIConfiguration on a device when using Provisiond to scan it. By default, it expects to make a WMI query to the Win32_ComputerSystem class, checking for OK from the Status object.

Detector facts



Configuration and use

Table 1. Required parameters for the WMIDetector
Parameter Description Default value


The username to use when authenticating against the WMI host.



The password to use when authenticating against the WMI host.



The Windows domain to use when authenticating against the WMI host.



The class of instances within WMI. An example would be the Win32_ComputerSystem class. This class contains objects representing properties and methods available.



A WMI object is technically a member of a WMI property set. Using the previous example of Win32_ComputerSystem, this class contains a variety of properties that we can look at and poll. The default WMI service uses the Status property to determine if the system is running and if WMI is available.



Microsoft WMI also implements an ExecQuery method that is more common in Windows scripting but less common in OpenNMS polling and monitoring. WQL is a simple, SQL-like syntax used to query WMI classes, properties, and instances. Here’s an example of a WQL query that you could use to discover whether a Windows service is running: Select State From Win32_Service Where Name='Server'



The value to use when performing a comparison against the WMIObject.



The compare operation is how you tell the OpenNMS WMI poller plugins how to verify the nature (up, critical) of a specific property within WMI. In the event of unequal comparisons, the system will always have the WMI value (as retrieved from the target) on the left. Available compare operations are:

  • EQ: equals

  • NEQ: not equals

  • GT: greater than

  • LT: less than

  • NOOP: no operation

The NOOP operation is a special case in which the Manager will always return a result code of OK. This is typically used in scenarios where the existence of a class or property is more interesting than the contents of the property. This can be used to ensure that WMI data is available before adding a collectd service based on the WmiCollector class.



The match type configuration tells the system how to handle multiple instance results. Available match types are:

  • all: all instances must comply to the compare operation.

  • none: no instances should comply with the compare operation.

  • some: one or more must comply with the compare operation.

  • one: only one instance can comply with the compare operation.



Every WMI class exists in a namespace. The default namespace for most common classes is root/cimv2. It is possible to refer to WMI objects from other namespaces such as root/MicrosoftActiveDirectory.