Page 1 of 1

NCPA not alerting on no process running

Posted: Fri Sep 14, 2018 6:49 am
by jenstar13
Hi,
I used NCPA to look to see if a process is running and it works just fine if the process is running, plus it gives me a lot more information than a check by ssh check_procs would, so that is great

the problem comes that when a process is not running, it still says ok and i can't figure out the correct arguments
I tried -w 0 -c 0. i even tried spelling it out, and it still says ok

[nagios@nagxi01 ~]$ /usr/local/nagios/libexec/check_ncpa.py -H 10.xxx.xxx.62 -t 'tokenname' -P 5693 -M 'processes' -q 'name=mongodb-mms-monitoring-agent' --warning=0 --critical=0
OK: Process count for processes named mongodb-mms-monitoring-agent was 0 | 'process_count'=0;0;0;

I don't want to go back to check_procs because of the extro info, can you help with the arguments?

Re: NCPA not alerting on no process running

Posted: Fri Sep 14, 2018 11:02 am
by lmiltchev
You can set your check to alert you when you have less than 1 process running (zero processes running) by using:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 10.xxx.xxx.62 -t 'tokenname' -P 5693 -M 'processes' -q 'name=mongodb-mms-monitoring-agent' --warning=1: --critical=1:
Read more about thresholds and ranges here:

https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

Let us know if this helped.

Re: NCPA not alerting on no process running

Posted: Fri Sep 14, 2018 12:58 pm
by jenstar13
thank you for the help, I see tat what i needed was the ":" after the numbers
you can close this