> ok, I will answer my own question. It is possible to do, we need to
> fill in in the host configuration, 'other hostnames/ips' field also
> the primary address (also for hosts with just one address).

> Then we can use check_icmp which accepts several addresses like
> $ADDRESS1$ $ADDRESS2$ ...., if only the first one exists, only that
> one will be checked.

> Really nice, thanks opsview team for this.

Sorry, didn't see your original message; here's how I do this -

I created a custom host (not service) check, "ping_multi_ip", using check_icmp 
and this 
command line:

-m 1 -t 3 -w 500.0,80% -c 1000.0,100% -H $HOSTADDRESS$ $ADDRESS1$ $ADDRESS2$

Then add your secondary/backup IP into the "Other hostnames/IPs" field.  
$HOSTADDRESS$ 
$ADDRESS1$ $ADDRESS2$ will expand to the primary/main IP and up to 2 
secondary/backup 
IPs.  "-m 1" means only one IP has to respond for the host to be considered up.

Then, to alert if the primary connection goes down, add a regular "Connectivity 
- WAN" service 
check listing the main/primary IP.  If you're doing other host checks, these 
will also alert if the 
primary IP is unreachable.

It would be nice if there was a checkbox for host/service checks to 
automatically check both 
primary and alternate IPs on all host/service checks, but the above works 
pretty well as a 
workaround.

Depending on your situation, you may run into ingress filtering at the ISP if 
the host replies using 
an IP for ISP A but the packet takes the ISP B path.


_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to