Directly checking WMI parameters on Windows system with Nagios(tm) plugins is a bit tricky. You need to have the WMIC libraries installed, and a suitable plugin or plugins ready to work with them. THis technical bulletin will install such a plugin on a 7.1.1 system which does have the WMIC libraries.
The plugin itself (check_wmi_plus.pl) is an open source plugin, but there is also an enhanced version which offers some performance gains and additional checks. If you need these features, please see the plugin maintainer site:
GroundWork support will help you in the usual way with the open source version of the plugin.
This bulletin is only compatible with GroundWork Monitor version 7.1.1, and the relevant code is included in later releases.
Installing the plugin, a perl module (Number::Format) and a useful profile is all taken care of with this technical bulletin.
- Download the scripted installer attached
Error formatting macro: attachments: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 *.tgz ^
- Place the install script on the GroundWork server you wish to poll Windows systems from, preferably alone in an empty directory.
- Extract tthe tar file:
As root or equivalent, type:
- Run the installer:
- Follow the prompts.
If you need to uninstall the technical bulletin, just run the uninstall scrip:
Note that this uninstaller will not remove the profile from the database if you have imported it already. See below.
This plugin is extensively documented in and of itself, and contains several files that can be used to configure multiple checks of several types. To get started quickly, however, just import the service profile called "service-profile-Windows-WMIC-based-checks.xml" under the Windows category in Configuration -> Profiles -> Profile Importer.
Then create a file on the GroundWork server in a place accessible by the nagios user to hold your credentials for the plugin (it needs access to the counters you want to check). For example, edit the file:
and enter three lines like this:
Replace the values with the credentials you want to use. Make sure the file is readable by user nagios:
Then, set the full path to this file as the Nagios macro $USER9$. This will allow you to test the services you imported with the profile against hosts in the domain, and to deploy the monitoring as you would any polled check.