check_procs plugin

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
noodle48
Posts: 21
Joined: Thu Mar 08, 2012 11:45 am

check_procs plugin

Post by noodle48 »

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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: check_procs plugin

Post by agriffin »

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.
noodle48
Posts: 21
Joined: Thu Mar 08, 2012 11:45 am

Re: check_procs plugin

Post by noodle48 »

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??
noodle48
Posts: 21
Joined: Thu Mar 08, 2012 11:45 am

Re: check_procs plugin

Post by noodle48 »

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!
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: check_procs plugin

Post by agriffin »

Glad you got it figured out and working!
Locked