Monitoring 2 or more ip address in the same host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

Monitoring 2 or more ip address in the same host

Post 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:
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

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

Post 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?
paulol
Posts: 159
Joined: Wed Jul 02, 2014 11:39 am

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

Post by paulol »

OK, you answered my question.

Thx.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

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

Post 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.
Locked