Change Log

Version 1.57 - in development

  • Nothing yet ...

Version 1.56 - 8th May 2013

  • Added check_wmi_plus.makeman.sh into the bundle. I can't believe I left this out of the download for so long. I can't believe I've quite happily been using the man page and you've all been reading the text-based help and no one told me. Thanks to j.mccanta for pointing this out.
  • Added checktime. This is the ability to check the Windows time against the time of the machine that Check WMI Plus is running on. Warn/Critical criteria are used to generate alerts if the difference is outside a given range.
  • Fixed a bug in the regular expression for checkeventlog. There were not enough fields defined since adding EventCode and EventIdentifier to the query. Thanks to Matteo Dalfonso for pointing out the symptoms of this problem.
  • Added the Name field to the query for checkpage. In the Linux version of wmic the field is automatically added but for the Windows version (the Shinken project) it is not automatically added and hence fails. Thanks to Jean-francois Butkiewocz for finding this.
  • Fixed a bug in event_generic.pl where it did not work correctly in ICINGA when calculating $opt_numbersoft. Thanks to MatteoVi for finding this one.
  • Took "use lib" out of the conf file (since it really did nothing) and moved the equivalent "use lib" to the top of the plugin code for users to change there if needed. Thanks for Matt Keller for pointing this out.
  • Fixed a problem where literal \n (ie 2 ASCII characters) embedded in multi-line plugin output (ie as defined in ini file checks) were not getting correctly interpreted as a new line character in the plugin output. Impact was noticed when displaying usage stats.
  • Disabled timeout when viewing --help. (Given that this only impacts when viewing as a manpage, its little wonder no one complained about this one - see the first change on the list for this version!)
  • added ability to add RAM values to page values for checkpage using -4 1. Thanks to Avinash Sharma for suggesting this.

Version 1.55 - 18th Jan 2013

  • Moved all required Module "declarations" to the top of the code.
  • Added display of parsing errors for ini files.
  • Added ability to filter event log by the Event Code field - thanks to Bastian Herzog for suggesting this
  • Added [checkproc memoryabove] to allow you to alert on processes that use more (or less) than a specified amount of memory. Thanks to Alexey Lukin for suggesting this.
  • Added code for use with the first publicly available version of Pro: timers, a consistent approach to program exit to display usage stats, options for controlling Pro features. A new configuration file is required for Pro users.

Version 1.54 - 28th Oct 2012

  • Updated the documentation for SQL checks with the correct use for non-default SQL instance names. Thanks to Eli Katz for help here.
  • event_generic.pl modified to work with Icinga as well.
  • Added some extra debug to event_generic.pl
  • Working on using the new WMIClient library developed for us. This removes all wmic forking and reduces CPU utilisation of the plugin to about 60% of the forking version. If the library is available it will automatically be used. Provided command line and config file options to force the use of the wmic binary. Library available separately. This change only enables it to be used.
  • Added OS detection code to detect when plugin is running under Windows. This is to assist the Shinken project to reduce their downstream changes when new versions are released.
  • Enhanced checkeventlog so that it can now show a list of (or just one) event severity levels, not just all levels less than a specific level. Requested by David Michalčík.
  • Added checkdtc to show information about Microsoft Distributed Transaction Coodinator. Thanks to Bernie Ledwick for getting us started on this one.
  • Added a check for process attributes (checkproc info) eg file handles, threadcounts, page faults, working set size etc. Thanks to Torben Nielsen for suggesting a process file handle check.
  • Updated all the SQL checks in check_sql.ini to correctly require v1.51 not v1.42
  • Fixed a bug where the newly added validity checking inadvertently removed good data returned by wmic. This showed itself in checkdrivesize when disks did not have volume names. The workaround is to give the drive a volume name. Thanks to David Michalcik who stumbled upon this unknowingly.

Version 1.53 - 27th July 2012

  • Added event_generic.pl. This is a generic use, parameter driven event handler script. It allows for simple command definitions to run event handlers under various conditions. Initial commands provided to restart Windows services and reboot Windows computers. It is not limited to Windows. It can run any commands on the Nagios host.
  • Added more validity checking for returned WMI data. Sometimes additional header rows are returned in the WMI data. This has only been reported on servers which have Microsoft Forefront Threat Management Gateway installed on them. This checking will not work if you are using the headerregex and dataregex (with a regular expression) settings in the ini file. Thanks to Martin Hoffmann for reporting this.
  • Added the ability to check multiple event log files in the same check. At the moment -a LOG only allows you to specify a single logfile eg system. It can now take a comma delimited list and/or use the % wildcard. Suggested by Maarten Minnebo.
  • Added ability for checkeventlog to look at Information and other event types (other than just warning and error levels). Thanks to Kyle Tucker.
  • Changed checkpage to automatically include all page files if none are specified. Inspired by a question raised by op5.
  • Added the option to disable the perl module checking into the .conf file by setting $ignore_my_outdated_perl_module_versions=1. Thanks to op5 for suggesting this.
  • Changed the display formatting of numbers requiring K,M,G etc units to look nicer. This introduces an additional perl module dependency for Number::Format. You will need to install that before using this version. Thanks to op5 for suggesting this.
  • Added network adapter utilisation to checknetwork using _SendBytesUtilisation and _ReceiveBytesUtilisation. Thanks to op5 for suggesting this.

Version 1.52 - 12th April 2012

  • Fixed a problem where non-default namespaces were not correctly getting used
  • Fixed a compile problem that did not even allow the plugin to run at all on perl versions less than that used for development. Problems were experienced with perl <5.14. Now tested on perl 5.12 and perl 5.10. Thanks to Eli Katz for finding this.
  • Added the basicmaths customfield function which allows you to do basic maths on any fields eg add 2 fields together, multiply the value of a field by a constant or a command line argument. Thanks to Paul Jobb for asking for this.
  • Added ability to substitute command line arguments into inifile customfield function parameters.

Version 1.51 - 4th April 2012

  • Total rewrite of checknetwork so that the network interface can now be specified by Connection Name (as seen in Control Panel), IP Address or MAC Address. This uses the new join WMI query functionality to achieve this. It can also show the results for multiple network adapters in a single check if required. You will need to reconfigure your checknetwork checks from the last version when upgrading.
  • Fixed a bug in checkfilesize where we were zeroing out the filesize. Thanks to Bernie Ledwick for finding this. He must be the only one in the world using this check!
  • Enhanced checkpage to use the new join functionality. If using -a auto, the additional WMI query to obtain this extra information is joined to the original query and the results cached. This speeds up the check in this case.
  • Fixed checkpage so that it can report on more than one page file. Works in a similar fashion to checkdrivesize. Thanks to Peter Hanraets for finding this.
  • Added checksmart to check the SMART status of all hard drives on the system. Reports if any drives are failing the SMART checks which signals imminent hard drive failure. Using the new join function we also grab various SMART attributes such as temperature. Joining more WMI data we also grab the disk serial number which is believed to only work on OS versions above Win XP and Win Server 2003. Thanks to M Morgenstern for pointing us at the right references for interpreting the SMART data from WMI.
  • Added ability to perform join queries from an ini file. Its only a basic implementation to start with and does not contain much error checking.
  • Added ability to join WMI queries on a single field for exact and non-exact matches (using a regex). This setting has led directly to or enabled some of the changes above.
  • Retired the checksqlex series of checks. You can now use checksql with -a MSSQLSQLEXPRESS_MSSQLSQLEXPRESS. This removes an entire ini file.
  • Changed checkdns to allow the specification of a ContainerName (usually seen as a domain name) to restrict the search to a specific domain. Thanks to Eli Katz for suggesting this.
  • Change checksql to allow the specification of a SQL Instance name. We need some help on this one to help work out the SQL instance name mapping to the WMI class name. See --help for checksql for more info.. Thanks to Grant Davies for bringing the fact of different SQL class names depending on how the SQL instance has been setup.
  • Changed checksql cache and checksql locks to use _Total as a default value for ARG1.
  • Added the ability to specify default values for {_arg1}, {_arg2} etc values in query= definitions in inifiles.
  • Added queryextension= for ini files. This allows variable substitutions into query= definitions. This means that you can cover a wider range of checks with fewer check definitions. There are also probably uses for this we have not even thought of yet. Documentation is in [sample full]. This setting has led directly to or enabled some of the changes above.
  • Added --extrawmicargs so that you can pass arguments directly to wmic eg --option="client ntlmv2 auth"=Yes. Thanks to Paul Jobb.
  • Added ability to include/exclude event logs by Event ID (EventIdentifier). Thanks to Kenneth Moller for suggesting this.
  • Fixed another incompatibility with older versions of Config::Inifiles which impacted checkeventlog. Thanks for Mark Shirley for finding this one.

Version 1.50 - 10th February 2012

  • Fixed another incompatibility with older versions of Config::Inifiles which resulted in errors like "Could not correctly parse ini createlist" or "Could not correctly parse ini customfield". Thanks to Robert Jackson for finding this one.
  • Added checking for Perl Module versions, as using old versions is a common source of problems.
  • Added ability to use an Authorisation File which contains the username/password/domain details. Specified on the command line and passed directly to wmic. This will help with passwords which contain special characters.

Version 1.49 - 16th December 2011

  • Added checkfolderfileage, where you can warn/critical if any or some files in a specified folder fit the range criteria you specify. Thanks to Steve Hanselman for the idea.
  • Fixed a bug where we print out an "Uninitialized" error when we remove all WMI data by including nothing when using --includedata
  • Changed the --includedata and --excludedata parameters so that they do not generate "Invalid Option Linkage" errors in more cases.
  • Fixed a bug in checking of event log exclusions by message. Thanks to Erich Schommarz for finding this and providing the fix.
  • Fixed a bug where passwords containing $ did not work. You must single quote or escape them from the command line for it to work otherwise they get interpreted by the shell as a variable substitution. This also applies to any other special shell characters. Thanks to Helmut Wieser for finding this.

Version 1.48 - 30th September 2011

  • Stopped checkpage from dying when there is no page file. Thanks to Jean-Yves Simon for finding this.
  • Added a calculation function HYPERV_TOTALVM_MEMORY to help Hugues Mantion develop his HyperV checks.
  • Added checkvolsize. This uses the WMI class win32_volume. This can be used to monitor volumes mounted as junction points (ie no drive letters) as well as normal logical volumes. Thanks to Daris Bouthillier for suggesting this.
  • Added aligndata= for inifiles. For checks that use multiple WMI queries and where multiple rows are returned for each query, it is assumed that the same number of rows are in each query and that they are in the same order. This works most of the time for things that don't really change eg number of CPUs but could be more of a problem for things that may change more often eg processes. It will result in the plugin showing errors or incorrect values. Use aligndata=FIELDNAMELIST (see sample ini file) to correct this possible situation.
  • Added the ability to include/exclude WMI query data based on field values. Specifications can be made on the command line and/or in the ini file. This is significantly more powerful than adding WHERE clauses to the WMI query since it can also operated on field values that the plugin calculates. Thanks to Robert C. Seiwert who identified that sometimes plugin responses get truncated as they are too long for Nagios to display.
  • Changed --iexamples so that it can generate HTML for this FAQ page as well.
  • Fixed a minor problem where slightly out-of-date data could be shown. When using a check that required data from 2 WMI queries, the non-calculated fields were from the first WMI sample.

Version 1.47 - 11th August 2011

  • Added --iexamples which allows easy generation of some command examples in HTML that are pasted into this FAQ page.
  • Renamed option -x NODATAEXIT to --nodataexit NODATAEXIT
  • Renamed option --nodata to --nodatamode
  • Added --nodatastring NODATASTRING. This allows a custom string to be shown when no WMI data is found. Thanks to Ola for the suggestion.
  • Added checkad replication by Patrick Fratczak.
  • Exchange 2003 uses different WMI Classes to 2007 and 2010. Added one Exchange 2003 check, checkexchange2003 listDBInstances. This might get someone started writing their own checks for Exchange 2003.
  • Added the ability to specify the username on the command line in the format -u USER@DOMAIN as well as the standard -u DOMAIN/USER or just -u USER. We manipulate the format to change it to DOMAIN/USER to pass to wmic. Thanks to Chris Reinke for this idea.
  • Fixed an incompatibility with older versions of Config::Inifiles which resulted in errors like "Could not correctly parse ini createlist". Thanks to Patrick Fratczak and Christian Mies for both finding this one and helping test the fix.
  • Add a check_wmi_plus.conf file which holds all (well almost all) the user configurable directory settings. This should make it easier to drop in new versions in the future without having to edit the settings each time.
  • Change the byte scaling function to use printf's f format instead of g format eg will show 0.981GB instead of 1+e03GB.
  • Added checkpower - for checking power supplies. Not tested on physical hardware. It would be really helpful of someone using this on physical hardware can send me the output of this check adding the -d option to the command line.
  • Added more SQL (and SQL Express) checks - general stats, latch stats, lock stats, SQL stats, wait stats, memory stats, cache stats
  • Renamed checksql ServerBufferManager to checksql buffermanager
  • Added checkusers check eg check for users with no passwords, check for local users, check for disabled users etc.
  • Added the ability to specify the WMI namespace to wmic (from command line and in the inifile). This allows access to a lot more WMI classes for the creation of more checks.
  • Added some more DNS checks, -s arecords, -s ptrrecords, -s cnamerecords. These simply count the number of DNS records of each type. The first checks to use a non-default namespace.
  • Added display and performance data for the count of excluded processes and services. You can test warn/critical against it (if that makes sense!). Thanks to a comment made by Simon Nussbaum.
  • Rework of help text. Triggered by a comment made by Helmut Schneider. Formatting like a man page so that variable width terminals are handled better. Automatically include information about certain parameters if they are valid ie reduce amount of information needing to be documented by hand eg DELAY, WARN/CRIT parameters etc. Use man to display the help.

Version 1.46 - 18th July 2011

  • removed old versions of checks that are no longer used
  • Added the ability to exclude services and processes from checkservice and checkprocess using regular expressions. Inspired by a comment on exchange.nagios.org by IamiceFi.
  • Started adding some Information checks ie checks that really are only useful for the information they provide eg OS version, Network addressing etc. Added a new mode=info with submodes os, net, listsoftware2003, listsoftware2008, listsoftwarefeatures2008
  • minor change to enhance error messages
  • added several more checkproc checks (cpu, count, cpuabove) for checking processes.
  • changed -n (in the documents/comments) to be the full version ie --nodata. It clashed with other arguments starting with -n
  • Provided an optional mechanism for some utilisation calculations where we can specify a maximum allowable value. Implemented the value of 100% for checkcpu and checkeachcpu.
  • Changed default location of wmic to /bin/wmic (which is where the make install puts it).
  • Removed the need for MODE=, SUBMODE= in the ini file inihelp section. This is now automatically generated when using --help.
  • Added a trap for an error that can happen when you test the plugin from the command line (using keepstate) and then when Nagios runs it you get a permission denied error. The trap explains the error and how to fix it.

Version 1.45 - 25th June 2011

  • Try to show clearly when calculations fail for certain fields. Use the string CALC_FAIL in place of of empty data. Try not to give an uninitialised error when doing this. Do not include performance data that has failed to calculate/obtain data since this might make the performance data processor fail. This may occurs when your OS does not provide all the WMI fields needed for a calculation. It most likely works on other OS versions, there is just no WMI data for your OS. Doing it this way so we don't have multiple checks of the same thing for different OS versions.
  • checkts sessions now works for Server 2008. Existing users if this check should change to new checkts sessions2003. Thanks to Andrew (aj4321.stuff).
  • First few checkexchange checks added - thanks to Cocoon.
  • First basic checksql checks added - thanks to Cocoon.
  • Added more useful error messages when wmic has problems and if calculations fail. Hopefully, they will help you fix problems more easily.
  • checkuptime did not work on Windows 2000. Now modified so that it does. Thanks to Brent Parish for finding and testing this one.
  • checkprocess commandline also does not work on Windows 2000. Added another option, ExecutablePath which is almost the same, but does work on Windows 2000. Thanks to Brent Parish for finding and testing this one.
  • changed the behaviour of checknetwork when an incorrect adapter name is specified to list out valid adapters.
  • Introduced state keeping. For certain checks eg checkcpu, checknetwork etc, keeping state means that we difference WMI values between runs of the plugin. This makes for very accurate representation of utilisations etc. Previously, the plugin did not know about events eg high CPU utilisation that occurred when the plugin was not running. Now, this information is captured. We like this feature so much that it is enabled by default. Read --help for more detail.

Version 1.44 - 16th June 2011

  • All inihelp now shown in full at the end of --help
  • A readme now included in each release, showing the output of --help
  • Now tested on Windows Server 2003 R2 (Thanks to Grant Davies for the license). There are some checks that are missing some data (they display NO_WMI_DATA) but these are inconsequential. I could create custom checks based on the Windows version but it does not appear worth it.
  • Added checkprint
  • Added checkdns
  • Added checkdhcp and checkdhcpv6
  • Added some VERY basic SQL and SQL Express checks. This will be added to later.
  • Changed checkio to be able to return data for multiple drives in a single check. Due to this, performance data which includes the name of the device - this works better if you are returning multiple drives in a single check. All previous performance data will be lost. You could use the old behaviour using your own ini file if you wanted.
  • In debug output automatically mask the username/password in the wmic command and when we show the command line (unless using the -z option)
  • checkmem now only checks physical RAM. checkmem page proved to be inaccurate. Created checkpage instead which uses data from a different WMI class. Thanks to Kyle Tucker for notifying us of this problem.
  • Sometimes calculated fields based on WMI Raw data which use the WMI field Timestamp_Sys100NS return negative values. This affects checks which were calculated by differencing 2 WMI queries over a period of time eg checkcpu. This is most likely caused by inaccurate timing information provided by the hardware. This most likely only affects virtual machines, probably more on busy host platforms, due to their known inability to return accurate clock information. To counter this, we now check all calculated values and if they are below zero, we make them zero. This is really only a work-around. All calculations like this on VMs will be inaccurate by single digit percentages, especially when checked over short timeframes. We recommended using values for -y and -t as high as you can to improve accuracy. Thanks to Lee Kennedy for notifying us of this problem.
  • If you are using a DOS/Windows type file for your Nagios config, the plugin gets passed CR at the end of the command line and this may make the plugin fail. Remove a single CR from the end of the line, if it exists. Thanks to Grant Davies for finding this.

Version 1.43 - 30th May 2011

  • users can now specify an ini directory where all .ini files are read. This makes it easier to keep your own custom ini defined checks between releases and download other users ini files. You can still specify a single ini file if you want.
  • the release ini file is now multiple ini files in the ini directory
  • added checkeachcpu which shows details for all CPUs on the system as well as total CPU (suggested by Radu Popa).
  • checkeventlog can now use regular expression to include/exclude various records (suggested by Kyle Tucker). See --help and the new file event.ini
  • checkwsusserver removed and replaced with -m checkeventlog -o 2 -3 24 -4 wsusevents -c 0. See --help
  • checks can now process multiple rows of returned WMI data. Added a new ini file setting predisplay= to support this. Only been tested for checkeachcpu so far.
  • added checkeachcpu in the ini file. This checks individual CPU (core) utilisation (suggested by Radu Popa). This is the first check to use the new multi-row processing.
  • changed [checkproc memory] and added a new setting processallrows=0. This is now required for this check since the WMI query in this check returns multiple rows but we do not want to process each one individually
  • Fixed bug where checkprocess only ever exited with OK
  • Fixed a "Use of uninitialized value" error in checkprocess if no data was returned by the WMI query (weird condition this one)
  • Added [checkiis transfersV5] for version 5.1 of IIS (default version with Windows XP and maybe others). There are fewer WMI fields available in this older version.
  • Try to show clearly when there is no WMI data for specific fields returned by the WMI query. Use the string NO_WMI_DATA in place of of empty data. Try not to give an uninitialised error when doing this. If you see this in the plugin output then it might mean 1) Your WMI query is wrong 2) That field does not exist for the version of OS/software you are using. [checkiis transfers] is an example of a check that has no WMI data for some fields when checking IIS version 5. For this reason [checkiis transfersV5] was created with problem fields removed.
  • Started using Module Scalar::Util (as part of the NO_WMI_DATA checks)

Version 1.42 - 21st May 2011

  • added 5 different checkiis checks to the ini file. These use WMI Raw Perf data to get an accurate result over a defined period of time.
  • added 2 different checkts (terminal services) checks to the ini file
  • added [checkproc memory] to the ini file so you can query process memory on a per process basis (suggested by Radu Popa).
  • checknetwork enhanced from previously showing WMI point values to calculated values over a period of time (like checkcpu) - much more accurate now
  • checkio enhanced from previously showing WMI point values to calculated values over a period of time (like checkcpu) - much more accurate now
  • --inihelp now shows the first line of the inihelp setting from the ini file when no mode/submode specified - makes it easier to find the check you are looking for
  • require Data::Dumper only when using -d
  • added customfield= ini file setting which allows creation of new fields calculated from existing ones based on the data type (like what we do for checkcpu)
  • enabled the calc= field in the ini file
  • added createlist= ini file setting to create lists of results (used in checkproc memory)
  • checkcpu converted to use custom value calculator (equivalent to customfield=)

Version 1.41 - 12th May 2011

  • first version to support user created checks via the ini file (provided in release bundle)
  • provided the first release version of the ini file with documentation and sample checks
    • new command line parameters inihelp and inifile
    • several internal changes to make checks even more parameter driven eg the ini file parameters slashconversion=, dataregex=
    • added checkio (via the ini file)
  • Added options to control how the plugin responds when no data is returned from the WMI query (for some checks only)
  • Introduced SUBMODE and changed checkmem and checkprocess to use it as well as any ini file checks that want to
  • checkprocess can now be configured to search against the whole process command line and/or show the whole command lines found or only the process names found
  • changed all internal use of command line arguments to be like _arg1 instead of arg1 - makes user access via ini file more consistent

Version 1.4 - 30th April 2011
Note: This version has a lot of internal changes. I've tried to test as much as I can ...... use an older version if this creates problems (see links above) or contact me (see links above)

  • the way you specify some arguments to some checks has changed. You may need to reconfigure some of your checks.
    a lot of rewriting of major subroutines to take large steps towards supporting parameter driven checks ie for the ini file, checkexchange etc
  • you can use multiple warning/critical specifications to make complex criteria. For example check against drivesize and/or drive utilisation% in a single check <- that was mildy complex to code .....
  • checknetwork now has warning/critical criteria
  • checkprocess now checks against regular expressions
  • ini file can be overridden using a command line parameter
  • checkdrivesize can now optionally use Volume Names in performance data instead of drive letters. The overall disk space can be displayed (all drives added up)
  • checkservice has more complete performance data listing totals, good and bad status
  • standardisation on the display of results. Always start with Critical/Warning/Ok and list the warning/critical criteria that were triggered (if any)

Version 1.3.4 - 21st April 2011

  • fixed a problem with checknetwork when an incorrect adapter name is specified
  • fixed a problem with checkprocess when no processes were found

Version 1.3.3 - 21st April 2011

  • added an early version of checknetwork - can not specify warn/crit criteria yet
  • added checkfileage
  • introduced the -y DELAY parameter used for checkcpu
  • documented how the multipliers eg G, M can be used for warn/crit specifications
  • started standardising how I do WMI queries and parse the results
  • introduced the concept of a time multiplier, initially used for checkfileage eg 5day

Version 1.3.2 - 19th April 2011

  • Changed checkcpu to use raw performance counters over a time period for more accurate CPU utilisation values
  • Added checkcpuq, a processor queue length check.
  • Added some code for the upcoming ini file (does nothing at the moment), which will be used to extend the functionality of check_wmi_plus

Version 1.3.1 - 15th April 2011

  • Base version for change log

Version 1.2 - Late March 2011