NCPA not alerting on no process running

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jenstar13
Posts: 174
Joined: Wed May 11, 2016 7:48 am

NCPA not alerting on no process running

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA not alerting on no process running

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jenstar13
Posts: 174
Joined: Wed May 11, 2016 7:48 am

Re: NCPA not alerting on no process running

Post by jenstar13 »

thank you for the help, I see tat what i needed was the ":" after the numbers
you can close this
Locked