Page 1 of 1

Un-necessary alerts

Posted: Mon Jun 02, 2014 10:37 am
by Rupender
Hi,

I am using NagiosXI R1.0 on Centos 6.4 (64 bit OS). when i added one Ubuntu 12.04 server after installing SNMP package on it. it give below notification.

while it fetch 1 process matching mysqld as expected but it generate notification of Critical also. i am not getting why it give critical alerts?


COMMAND: /usr/local/nagios/libexec/check_snmp_process_wizard.pl -H 169.131.X.X -C public --v2c -n 'mysqld' -w '1,5' -c '1,100'
OUTPUT: 1 process matching mysqld (<= 1 : CRITICAL) (<= 5):OK

Re: Un-necessary alerts

Posted: Mon Jun 02, 2014 10:57 am
by slansing
You are telling it that if you have 1-5 processes running you want a warning, and 1-100 you want a critical... so you will always have a critical unless you have <1 or 100> running. You need to change your warning and critical thresholds to a proper format:

Code: Select all

[-w <min_proc>[,<max_proc>] -c <min_proc>[,max_proc]

Re: Un-necessary alerts

Posted: Mon Jun 02, 2014 11:24 am
by Rupender
Thanks for instant reply..

Please tell me syntax, if i want to monitor that at least one process should go then OK and if process is not running then i generate critical alerts.

Re: Un-necessary alerts

Posted: Mon Jun 02, 2014 2:29 pm
by lmiltchev
You can use:
-w '0,100' -c '0,100'
The check will return "OK" when the number of matching processes is greater than 0 (zero). If 1 process is running you will get "OK". The max threshold could be as high as you want it to be - you will get "OK" as long as the number of processes is less than or equal to the max threshold. If there are no processes running, you will get "CRITICAL".