Need to monitor by hostgroup

Joel joelseph at watchtv.net
Thu Jul 22 21:26:39 CEST 2004


Joel <joelseph <at> watchtv.net> writes:

> 
> Sean Dilda <agrajag <at> dragaera.net> writes:
> 
> > 
> > On Thu, 2004-07-22 at 10:05, Joel wrote:
> > > I have multiple hosts within a hostgroup and am trying to find a way for 
> only 
> > > one notification to be sent if any of them go down.  Dependencies are 
not 
> an 
> > > option, as they do not have a common dependency.  Is there any way to 
> setup a 
> > > hostgroup to send notifications instead of individual hosts?
> > 
> > You should be able to use check_cluster to do this.  Set all the hosts
> > to not notify when they're down, then setup check_cluster for those
> > hosts, and set the warning level to 1.  The nagios docs has a section on
> > cluster monitoring under advanced topics.
> > 
> I have this setup, I think it will do what I want....  However, I'm 
> getting "(Return code of 139 is out of bounds)" on all of them...  I set up 
a 
> file in /usr/local/nagios/etc/ to store the host names and used the 
following 
> check_command and command definition per nagios documentation.
> 
> check_host_cluster!2!4!/usr/local/nagios/etc/hostcluster-business.cfg
> 
> define command{
>         command_name    check_host_cluster
>         command_line    /usr/local/nagios/libexec/check_cluster --host $ARG1
$ 
> $ARG2$ /usr/local/nagios/var/status.log < $ARG3$
>         }
> 
> I believe all of my file permissions on the plugin and mentioned files are 
> correct.  I'm not sure where else to look.  Anyone else with experience 
> setting this up have any ideas?

Nevermind, I figured this out right after I posted!  : )

The argument order that documented does not match the plugin's actual argument 
order.  The documentation shows a command line as follows:

/usr/local/nagios/libexec/check_cluster --host $ARG1$ $ARG2
$ /usr/local/nagios/var/status.log < $ARG3$

It should be:

/usr/local/nagios/libexec/check_cluster --
host /usr/local/nagios/var/status.log < $ARG3$ $ARG1$ $ARG2$

I am using nagios plugins v1.3.1.

Another thing I stumbled on:  You cannot associate the service that you put 
the cluster check on to any hosts that the cluster check tests.  This is in 
the documentation, but I missed it before I started setting this up.  It's 
working just fine now!

Thanks for the information Sean!  Hopefully this helps someone else...  I will 
submit the documentation error, assuming it hasn't already been noted & 
corrected.





-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
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