How to only alert if multiple hosts is down

Andreas Ericsson ae at op5.se
Thu Jun 16 00:44:31 CEST 2005


joseph.lin at comcast.net wrote:
> All,
> 
> As a poor man's way to see if the floor is out of power, I want to
> setup nagios to ping network printers that are in the building.
> 
> But I want to only be paged if all the printers are down.
> 
> Is there a way to set up something within hosts.cfg to achieve this?
> 
> I looked at host dependencies, but it doesnt seem like thats the
> proper solution?
> 
> any advice would be appreciated..
> 

Use check_icmp in host-check mode in its latest incarnation. It can 
check as many hosts as you like and will return OK so long as any IP 
specified is up.

Download the tarball from http://oss.op5.se/nagios
unpack it.
enter the directory and type 'make'.
Make a symlink;
ln -s check_icmp check_host
run
check_host -t 60 <ip1> <ip2> <ip3> <ip4> <ip5> <ip6> <ipn...>

It will stop and return OK as soon as it gets a proper ICMP response, so 
the run-time of this check will be extremely short so long as not all 
hosts are down (typically less than 10 milliseconds on a local network).

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&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