Page 1 of 1

Unknown status for windows process with argument

Posted: Tue Aug 14, 2018 7:33 am
by amane
Hi,

We have instrumented the monitoring for the windows process which has the argument in Nagios XI, however the status is showing unknown instead of critical in Nagios if the process stop/killed or not available on server.

We have added below mentioned argument in commandline even though status is unknown.

"crit=count <=0"

Could you please help me to resolve this issue.

Thanks & Regards,
Avinash

Re: Unknown status for windows process with argument

Posted: Tue Aug 14, 2018 3:12 pm
by cdienger
Please provide the full command so we can verify the plugin and other arguments provided.

Re: Unknown status for windows process with argument

Posted: Fri Aug 17, 2018 3:40 am
by amane
Hi Cdienger,

Please find below the full command.

check_nrpe!check_process!-a process="cmd.exe" "filter=command_line like 'runCISAgent.py'" "crit=count <=0"


Thanks & Regards,
Avinash Mane

Re: Unknown status for windows process with argument

Posted: Fri Aug 17, 2018 3:21 pm
by cdienger
You can pass a empty-state arguement to the check to tell it what to return if the filter doens't match anything. For example:

./check_nrpe -H remote_ip -c check_process -a process="cmd.exe" "filter=command_line like 'runCISAgent.py'" empty-state='critical'

Note that the message returned will still say UNKNOWN, but the return value will be critical(2). YOu can see this by running the following immediately after running the check on the command line:

echo $?

https://docs.nsclient.org/reference/win ... ss_options