Page 1 of 1

WMI Host Wizard Process Monitoring (Won't issue error)

Posted: Fri Apr 25, 2014 3:09 pm
by tsbank
Nagios XI Version : 2012R2.9
CentOS release 6.5 (Final) 64 bit
VMware image

We are trying to monitor an application process using WMI and the check_xi_service_winplus (this is what the wizard automatically selected when choosing to monitor a WMI host). We are running in $ARG3$ checkprocess and we are running in $ARG4$ -sCommandline -a "PROCESSNAMEHERE.EXE".

It correctly tells us how many instances of that process we have running but when it hits ZERO we want it to issue a warning and or an error so we can investigate.

I can't figure out anywhere to set something like that and I can't even find the checkprocess argument command in documentation.

Thanks!

Re: WMI Host Wizard Process Monitoring (Won't issue error)

Posted: Mon Apr 28, 2014 9:41 am
by slansing
You need a space between your flag and it's value "-s Commandline".

I'd recommend you test this from the command line before setting up checks, that way, we can give you commands to try as we troubleshoot your issue.

Re: WMI Host Wizard Process Monitoring (Won't issue error)

Posted: Mon Apr 28, 2014 9:47 am
by tsbank
Sorry that was a typo. There is a space there. The command works properly but what I need it to do is when the process count drops below 1 (AKA not running) to trigger a warning or error alert in Nagios. When we shutdown the process it shows as 0 running instances but doesn't issue a warning.

Re: WMI Host Wizard Process Monitoring (Won't issue error)

Posted: Mon Apr 28, 2014 2:00 pm
by scottwilkerson
in $ARG4$ add

Code: Select all

 -c 1:
Which means it will be critical if it is outside the range of 1 to infinity

So $ARG4$ should look like

Code: Select all

-s Commandline -a "PROCESSNAMEHERE.EXE" -c 1:

Re: WMI Host Wizard Process Monitoring (Won't issue error)

Posted: Mon Apr 28, 2014 2:09 pm
by tsbank
Perfection! Thanks so much! :)