check_proc Question

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

check_proc Question

Post 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!
User avatar
eloyd
Cool Title Here
Posts: 2129
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: check_proc Question

Post 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).
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoydI'm a Nagios Fanatic!
and1100
Posts: 93
Joined: Mon Mar 25, 2013 8:37 am

Re: check_proc Question

Post by and1100 »

Awesome! Thank you very much.
Locked