Exact same swap + root / partition info showing up for different hosts(?)

Kevin Keane subscription at kkeane.com
Wed Dec 2 15:44:44 CET 2009


In addition, I notice a mismatch in the Disk service with the corresponding check_disk command definition.

The check_disk command is configured to require three arguments, but the service only supplies a single argument (and a wrong one at that - the first argument should be a warning level, not a directory).

In the command definition, you see the arguments as $ARG1$, $ARG2$ and $ARG3$. In the service, these correspond to whatever you find between the ! characters.

So the actual command that gets called is:

check_disk -w / -c -p

where in reality you would want something like

check_disk -w 80 -c 90 -p /

(Off the top of my head, I'm not sure if the warning and critical levels refer to percent free or percent used, so the numbers might be wrong).

> -----Original Message-----
> From: Greg Pangrazio [mailto:pangrazi at gmail.com]
> Sent: Wednesday, December 02, 2009 6:31 AM
> To: Juki
> Cc: Nagios
> Subject: Re: [Nagios-users] Exact same swap + root / partition info
> showing up for different hosts(?)
> 
> The commands as you have them defined execute the check commands on
> the local machine.  First you need to verify that in the nrpe config
> on the remote hosts you have the check users command defined.  Then
> you need to define a command on the monitoring station similar to
> 
> define command{
> command_name check_users_nrpe;
> command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_users
> }
> 
> That is why you are getting the results for the local machine when it
> is run via nagios.  The NRPE docs are located here
> http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
> 
> Greg Pangrazio
> pangrazi at gmail.com
> 
> 
> 
> 
> 
> On Wed, Dec 2, 2009 at 8:21 AM, Juki <juki.emma at gmail.com> wrote:
> > Hi Greg,
> >
> > My configuration is as below;
> >
> > For host definition;
> >
> > define host{
> >         host_name               emm4
> >         use                     generic-host
> >         alias                   Old BGW
> >         address                 10.151.28.32
> >         check_command           check-host-alive
> >         check_period            24x7
> >         check_interval          5
> >         contact_groups          admins
> >         retry_interval          1
> >         max_check_attempts      10
> >         notification_interval   120
> >         notification_period     24x7
> >         notification_options    d,u,r
> >         }
> >
> >
> > For service definitions;
> >
> > define service{
> >         use                             generic-service
> >
> >         host_name                       emm4
> >         service_description             Users
> >         is_volatile                     0
> >         check_period                    24x7
> >         max_check_attempts              3
> >         normal_check_interval           3
> >         retry_check_interval            1
> >         contact_groups                  admins
> >         notification_interval           120
> >         notification_period             24x7
> >         notification_options            w,u,c,r
> >         check_command                   check_users!5!10
> >         }
> >
> > define service{
> >         use                             generic-service
> >
> >         host_name                       emm4
> >         service_description             Load
> >         is_volatile                     0
> >         check_period                    24x7
> >         max_check_attempts              3
> >         normal_check_interval           3
> >         retry_check_interval            1
> >         contact_groups                  admins
> >         notification_interval           120
> >         notification_period             24x7
> >         notification_options            w,u,c,r
> >         check_command
> check_load!5.0,4.0,3.0!10.0,6.0,4.0
> >         }
> >
> > define service{
> >         use                             generic-service
> >
> >         host_name                       emm4
> >         service_description             Total Processes
> >         is_volatile                     0
> >         check_period                    24x7
> >         max_check_attempts              3
> >         normal_check_interval           3
> >         retry_check_interval            1
> >         contact_groups                  admins
> >         notification_interval           120
> >         notification_period             24x7
> >         notification_options            w,u,c,r
> >         check_command                   check_procs!250!400!RSZDT
> >         }
> >
> > define service{
> >         use                             generic-service
> >
> >         host_name                       emm4
> >         service_description             Disk Usage
> >         is_volatile                     0
> >         check_period                    24x7
> >         max_check_attempts              3
> >         normal_check_interval           3
> >         retry_check_interval            1
> >         contact_groups                  admins
> >         notification_interval           120
> >         notification_period             24x7
> >         notification_options            w,u,c,r
> >         check_command                   check_disk!/
> >         }
> >
> >
> > And finally the command definitions;
> >
> >
> > # 'check_users' command definition
> > define command{
> >         command_name    check_users
> >         command_line    $USER1$/check_users -w $ARG1$ -c $ARG2$
> >         }
> >
> > # 'check_load' command definition
> > define command{
> >         command_name    check_load
> >         command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
> >         }
> >
> > # 'check_procs' command definition
> > define command{
> >         command_name    check_procs
> >         command_line    $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s
> $ARG3$
> >         }
> >
> > # 'check_disk' command definition
> > define command{
> >         command_name    check_disk
> >         command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p
> $ARG3$
> >         }
> >
> >
> > Regards,
> > Juki
> >
> >
> >
> > 2009/12/2 Greg Pangrazio <pangrazi at gmail.com>
> >>
> >> Without your config file I cannot be sure, but likely the services
> are
> >> either using the wrong command ie not the nrpe version, or your
> check
> >> command is not configured properly..
> >>
> >> Can you provide your host and service definitions as well as the
> >> command configuration for the commands you are using?
> >
> >
> >
> >
> -----------------------------------------------------------------------
> -------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list