Page 1 of 1

Monitoring 2 or more ip address in the same host

Posted: Fri Sep 04, 2015 11:15 am
by paulol
Hi guys,

There any trick to monitor 2 or more ip address in the same host?
The services will check the first ip address if the first ip address comes down, he jumps to second ip address.

Looks like the picture below:

Re: Monitoring 2 or more ip address in the same host

Posted: Fri Sep 04, 2015 11:33 am
by jdalrymple
This question has been asked and answered about a thousand different ways, and for good reason. It all depends on the circumstance.

The answer is "no" you cannot do what you want directly. Wrapping logic into your check is trivial though - do you simply need a host check that does something more like:

Code: Select all

if [ (check_ping 10.0.0.1 sucks) && (check_ping 10.0.0.2 sucks) ]; then
everything sucks
else
everything is fine
fi
Or do you have a different use case?

Re: Monitoring 2 or more ip address in the same host

Posted: Fri Sep 04, 2015 12:54 pm
by paulol
OK, you answered my question.

Thx.

Re: Monitoring 2 or more ip address in the same host

Posted: Fri Sep 04, 2015 12:58 pm
by jdalrymple
Absolutely. If you need help crafting something like that which I demonstrated (that actually works) or any other sort of wrapper feel free to reach back out and we'll be happy to whip something up.