Page 1 of 1

Plugin for process count with WMI for Windows server 2012

Posted: Thu Jan 22, 2015 7:45 am
by mithun havakkanavar
Hi All,

I have created a command as check_run.exe as shown below

$USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m $ARG3$ $ARG4$ -o $ARG5$ -c 10

It works fine but it Triggers a Critical Alert when the process count is more then 10, our requirement is vise-verse.
We want the Alert to Triggered once the process count is less then 10.

Please us to get the alerts when the number of processes get reduced

Thanks
Mithun

Re: Plugin for process count with WMI for Windows server 201

Posted: Thu Jan 22, 2015 3:08 pm
by slansing
Have you considered using negate? This guide was written for XI but it holds true to core as well:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

Re: Plugin for process count with WMI for Windows server 201

Posted: Thu Jan 22, 2015 6:51 pm
by Box293
It might also be worthwhile reading this page

http://www.edcint.co.nz/checkwmiplus/?q ... lewarncrit
Given the above states, if we wanted to warn if there were less than 4 "good" services we have use a slightly different form of the range definition. We want to define a range that is from 4 to infinity, so that if we are outside this we get a warning. 4: defines a range like this.
Command: check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a sql -w _NumGood=4:
Output : WARNING - [Triggered by _NumGood<4] - Found 6 Services(s), 2 OK and 4 with problems (0 excluded). 'Microsoft Search (Exchange)' (msftesql-Exchange) is Stopped, 'SQL Server (SQLEXPRESS)' (MSSQL$SQLEXPRESS) is Running, 'SQL Active Directory Helper Service' (MSSQLServerADHelper100) is Stopped, 'SQL Server Agent (SQLEXPRESS)' (SQLAgent$SQLEXPRESS) is Stopped, 'SQL Server Browser' (SQLBrowser) is Running, 'SQL Server VSS Writer' (SQLWriter) is Stopped.|'Total Service Count'=6; 'Service Count OK State'=2;4; 'Service Count Problem State'=4; 'Excluded Service Count'=0;

Re: Plugin for process count with WMI for Windows server 201

Posted: Fri Jan 23, 2015 2:13 pm
by lgroschen
@mithun havakkanavar:

let us know if there documents work when you have the time to try look at them.