WMI Service Detector Use the WMI Detector to detect the availability of WmiConfiguration on a device when scanning it using Provisiond. By default, it expects to make a WMI query to the Win32_ComputerSystem class, checking for OK from the "Status" object. Detector facts Implementation org.opennms.netmgt.provision.detector.wmi.WmiDetector Configuration and Use Table 1. Parameters for the Win32 Service Detector Parameter Description Required Default value username The username to use when authenticating against the WMI host. Required Administrator password The password to use when authenticating against the WMI host. Required domain The Windows domain to use when authenticating against the WMI host. Required WORKGROUP wmiClass The class of instances within WMI. An example would be the Win32_ComputerSystem class. This class contains objects representing properties and methods available. Required Win32_ComputerSystem wmiObject 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. Required Status wmiWqlStr Microsoft WMI also implements an ExecQuery method which is more common in Windows scripting but less common in OpenNMS polling and monitoring. WQL, which stands for "SQL For WMI" according to Microsoft, is a simple SQL-like syntax for querying 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' Required NOTSET compVal The value to use when performing a comparison against the wmiObject. Required OK compOp 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. We use this in the collector to check and ensure that WMI is available before attempting to collect data. Required EQ matchType The match type configuration tells the OpenNMS WMI system how you want to cope with 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 - only some (1 or more) must comply with the compare operation one only one instance can comply with the compare operation Required all Namespace Every WMI class exists in a namespace. The default namespace for most common classes is root/cimv2 (sometimes also written with more slashes or with backslashes). It’s possible to refer to WMI objects from other namespaces such as root/MicrosoftActiveDirectory. Required OK Win32 Service Detector XML Samples