About Check_procs - OK FIXED


#1

hi there,
my idea is to check one process alive.
Then i get :

check_procs -C oidmon

But when no oidmon process is up, Nagios tell me:

[nagios@oidovsaadminpreprod ~]$ /usr/local/nagios/libexec/check_procs -C oidmon
PROCS OK: 0 process with command name ‘oidmon’

Then…why nagios is not CRITICAL state?
If the process is not alive why get me a OK state?

How could i say that only if i get 1 process is OK and the other cases are critical?

FORGET this post:

-c 1:1 works

/usr/local/nagios/libexec/check_procs -c 1:1 -C pollo
PROCS CRITICAL: 0 processes with command name ‘pollo’


#2

you have to use -w switch which defines Warning threshold. Run the check_procs command with the --help switch from the terminal and it will show you how to use those thresholds.

I think it should be used in this wa, but test it on your box to see if it suits your needs:

check_procs -C oidmon -w 1:12

These thresholds 1 and 12 mean min:max values. That means Warning will be anything outside this range. If the number of processes is lower then 1, then give Warning, and if it is higher then 12, also give a Warning, otherwise it will be OK. So, for your example I assume you could set the max value to a 1000000, because that threshold have little possibility to be out of range. Anyway, you are the right person to define those thresholds, relative to how many oidmon processes can there be on your box simultaniuosly.