Page 1 of 1

check_proc Question

Posted: Mon Jun 23, 2014 8:52 am
by and1100
Hi,

I have a large cluster of servers which I would like to set a proc threshold of warn at 700 and critical at 800. Normally I've been setting the values on each server individually as follows in the nrpe.cfg:

Code: Select all

command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 700 -c 800
Nagios server service in the object file:

Code: Select all

define service{
        use                             generic-service
        hostgroup_name                  hostgroup
        service_description             Total Processes
        check_command                   check_nrpe!check_total_procs
        max_check_attempts      1
        check_interval          1
        retry_check_interval    1
        notification_period     blah
        }
This is not very efficient for when I need to adjust across multiple servers. Is there a better way of doing this, perhaps hard-coding it on the Nagios server itself?

Thank you very much!

Re: check_proc Question

Posted: Mon Jun 23, 2014 10:32 am
by eloyd
Change your NRPE to be

Code: Select all

command[check_total_procs]=/usr/local/nagios/libexec/check_procs $ARG1$
Change your service check_command to be:

Code: Select all

check_command                   check_nrpe!check_total_procs!-w WARNING -c CRITICAL
Now you can replace WARNING and CRITICAL with 700 and 800 (or whatever is appropriate).

Re: check_proc Question

Posted: Tue Jun 24, 2014 8:59 am
by and1100
Awesome! Thank you very much.