Page 1 of 1

[Feature Request] enable check_ping to log ip address

Posted: Wed May 07, 2014 9:00 pm
by yinchuan
Please add a option to check_ping to log the ip address.
When I check a host points to multi-ips, I need to know which ip address can't be reached when Nagios report the host is down.
So, log the ip address got from the DNS in the result will be very helpful.
I googled and can't find anything to do this.

Thanks!

Re: [Feature Request] enable check_ping to log ip address

Posted: Thu May 08, 2014 9:37 am
by abrist
I will take a look. What is the use case for this? A service cluster? A load balancer? Have you considered creating multiple checks - one to ping each ip, or are these ips dynamic?

Re: [Feature Request] enable check_ping to log ip address

Posted: Thu May 08, 2014 8:06 pm
by yinchuan
abrist wrote:I will take a look. What is the use case for this? A service cluster? A load balancer? Have you considered creating multiple checks - one to ping each ip, or are these ips dynamic?
Thanks for reply.
In my case,I montior a external server owned by third party providing a web service, and the host points to many IPs (like 4). I have not to know which IPs they will use, so I can't create multiple checks.
Sometimes one or two of the IPs can't be reached cause the server is down or the network device deny ICMP packet, this will cause Nagios report 'the host is down'. When this happen, I need to know which IP the Nagios use to ping. This is very helpful for debug.

Re: [Feature Request] enable check_ping to log ip address

Posted: Fri May 09, 2014 9:40 am
by tmcdonald
Are you talking about logging to a file or about displaying this in the status info? Displaying this in the status info would be the preferred option, as we try not to have plugins create or modify files generally. Would this work for you?

Re: [Feature Request] enable check_ping to log ip address

Posted: Sat May 10, 2014 3:52 am
by yinchuan
> Displaying this in the status info would be the preferred option
Yes, This is just what I need, and a perfect option. Thank you!

Re: [Feature Request] enable check_ping to log ip address

Posted: Mon May 12, 2014 10:07 am
by slansing
We can see if the plugin dev's want to add this in, you could also post on the Github repo regarding this:

https://github.com/nagios-plugins/nagios-plugins

Though, there are some plugins out there that may already do this for you. I'd suggest checking the nagios exchange with keywords such as "ping multiple address." I found this one, that may or may not work. It's worth a look!:

http://exchange.nagios.org/directory/Pl ... dr/details

There are more alternatives on the exchange as well.