Configure number of processes in Nagios :

on the server to be monitored,

 

vi /etc/nrpe.conf

modify the line this way :

 

command[check_total_procs]=sudo /usr/local/nagios/libexec/check_procs -w 250 -c 300

then run visudo and add the following line below root ALL=(ALL) ALL

 

nagios ALL= NOPASSWD:/usr/local/nagios/libexec/check_procs

then , /etc/rc.d/init.d/xinetd restart

 

add to the services.cfg on the nagios server ,

define service{

host_name server.host.name

service_description TOTAL_PROCS

is_volatile 0

check_period 24×7

max_check_attempts 3

normal_check_interval 5

retry_check_interval 1

contact_groups group-admins

notification_interval 120

notification_period 24×7

notification_options w,u,c,r

check_command check_nrpe!check_total_procs

}

 

 

/etc/rc.d/init.d/nagios restart

 

Also check the permission of /usr/bin/sudo . This must be as follows

—s–x–x 1 root root 82120 Feb 16 2006 /usr/bin/sudo 

proc