The checks shown on this page are generated using the --iexample=2 parameter.
A valid -H HOSTNAME -u USER and -p PASSWORD must also be passed on the command line.
The examples are run against a test machine (which is not very busy) running Windows Server 2008 R2, IIS v7, SQL Express 2008 and Exchange 2010.
[@]start:end.FIELD=[@]start:end.Collecting first WMI sample because the previous state data file (/tmp/cwpss_somefilename.state) contained no data. Results will be shown the next time the plugin runs. then you need to run the command a second time to see the output.check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sqlOK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0; 'Service Count Problem State'=0; 'Excluded Service Count'=0; check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w 0OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0; 'Service Count Problem State'=0;0; 'Excluded Service Count'=0; -w 0 is a short form of the full range specification 0:0 which defines a range from 0 to 0. If the number of "bad" services are outside this range then we get a warning state. So, if we find even 1 "bad" service we will get a warning.-w 0 says that the plugin should go to warning state if it finds more than zero services in a "bad" state.check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w _NumGood=0OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0;0; 'Service Count Problem State'=0; 'Excluded Service Count'=0; 4: defines a range like this.check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w _NumGood=4:WARNING - [Triggered by _NumGood<4] - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0;4; 'Service Count Problem State'=0; 'Excluded Service Count'=0; 2:4. The command is:check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w _NumGood=2:4WARNING - [Triggered by _NumGood<2] - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0;4; 'Service Count Problem State'=0; 'Excluded Service Count'=0; check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w _Total=10OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0;10; 'Service Count OK State'=0; 'Service Count Problem State'=0; 'Excluded Service Count'=0; check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w @1:1OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0; 'Service Count Problem State'=0;1; 'Excluded Service Count'=0; -w 0), less than 4 "good" services (-w _NumGood=4:) or more than 5 total services (-w _Total=5) we just add them all to the command line at the same time:check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w 0 -w _NumGood=4: -w _Total=5WARNING - [Triggered by _NumGood<4] - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0;5; 'Service Count OK State'=0;4; 'Service Count Problem State'=0;0; 'Excluded Service Count'=0; check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w 0 -w _NumGood=4: -w _Total=5WARNING - [Triggered by _NumGood<4] - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0;5; 'Service Count OK State'=0;4; 'Service Count Problem State'=0;0; 'Excluded Service Count'=0; -w 1000 or we could use the "k" multiplier -w 1k. In order to ensure that "k" means 1000 we use the command line parameter --bytefactor=1000. check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w 1k --bytefactor=1000OK - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0; 'Service Count Problem State'=0;1000; 'Excluded Service Count'=0; --bytefactor=1024 or leave it out since that is the default setting.check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w 1k:WARNING - [Triggered by _NumBad<1k] - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0; 'Service Count OK State'=0; 'Service Count Problem State'=0;1024; 'Excluded Service Count'=0; -w. If you want to specify critical criteria use -c. If you have both -w and -c on the same command line and if the critical criteria and the warning criteria are both triggered the plugin will exit with a critical state.-c 0), but only a warning state if there was less than 4 "good" services (-w _NumGood=4:) or more than 5 total services (-w _Total=5) we do:check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -c 0 -w _NumGood=4: -w _Total=5WARNING - [Triggered by _NumGood<4] - Found 0 Services(s), 0 OK and 0 with problems (0 excluded). |'Total Service Count'=0;5; 'Service Count OK State'=0;4; 'Service Count Problem State'=0;0; 'Excluded Service Count'=0;