I want to use the check_procs plugin to look for a certain process on a remote server but only one under my hostgroups needs to have this happen. Do I need to create a servicegroup and add the host or can I just use the services.cfg file.
Thanks
check_procs plugin
Re: check_procs plugin
I'm not that clear on what you're asking, but you can create a new service and assign it to a single host without including the rest of the hostgroup.
Re: check_procs plugin
Maybe this will help:
Nagios server /usr/local/nagios/etc/objects/commands.cfg:
# 'check_local_procs' command definition
define command{
command_name check_local_sendmail
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
}
/usr/local/nagios/etc/hosts.cfg
define service{
use generic-service ; Name of service template to use
host_name **********************
service_description Sendmail Check
check_command check_local_sendmail!10!1024!sendmail
}
On the client /usr/local/nagios/etc/nrpe.cfg
command[check_sendmail]=/usr/local/nagios/libexec/check_procs -w 10 -c 1024 -C sendmail
On Nagios Dashboard I get this:
Sendmail Check
UNKNOWN 07-18-2012 11:12:09 0d 0h 1m 21s 1/3 Usage:
Where am I messing up??
Nagios server /usr/local/nagios/etc/objects/commands.cfg:
# 'check_local_procs' command definition
define command{
command_name check_local_sendmail
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
}
/usr/local/nagios/etc/hosts.cfg
define service{
use generic-service ; Name of service template to use
host_name **********************
service_description Sendmail Check
check_command check_local_sendmail!10!1024!sendmail
}
On the client /usr/local/nagios/etc/nrpe.cfg
command[check_sendmail]=/usr/local/nagios/libexec/check_procs -w 10 -c 1024 -C sendmail
On Nagios Dashboard I get this:
Sendmail Check
UNKNOWN 07-18-2012 11:12:09 0d 0h 1m 21s 1/3 Usage:
Where am I messing up??
Re: check_procs plugin
I figured it out. I need to add the following line to /usr/local/nagios/etc/nrpe.cfg on client:
command[check_sendmail]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
Otherwise my command won't know how to handle the command I mentioned above.
Thanks!
command[check_sendmail]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -C $ARG3$
Otherwise my command won't know how to handle the command I mentioned above.
Thanks!
Re: check_procs plugin
Glad you got it figured out and working!