Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have nagios setup as I want it, but last night it started alerting me of a problem pinging the internet. (I have a check that pings to test that the internet is still working)

Now looking into this problem I can see that my network can ping the internet fine, the server that runs nagios can also ping the internet but if I run

./check_ping -H -w -c

I get Network Unreachable


./check_ping -H [IP address of google] -w -c

I get ping OK

I can use ping on both ip and domain name and they both work fine.

Anyone got any clues as to where the problem lies, is it nagios or do I have a problem with DNS in my nagios box or in my network somewhere?


share|improve this question
What happens when you do "host"? – wolfgangsz Jun 8 '11 at 11:05
up vote 10 down vote accepted

Same thing happened to us last night starting at about 20:01 EDT, and the alert is still not functioning properly. I hadn't tried running the check_ping with one of Google's IP addresses until I read your post though, and it worked here just as it did for you. ping returns successful pings, and I can browse to from my nagios server as well, but the check_ping monitor is still critical.

-- fixed-for-me --

I found that the ping6 command failed immediately with a network unreachable error, while a ping succeeded. I ran the check_ping command as before with adding a -4 flag at the end to force it to use IPV4, and the check_ping now succeeds.

/usr/lib/nagios/plugins/check_ping -H -w 100.0,20% -c 200.0,40% -4
PING OK - Packet loss = 0%, RTA = 22.51 ms

So I edited the commands.cfg file to add a -4 to the end of the command, and voila, a successful check.

share|improve this answer
Glad to here I am not alone, which suggests that it might not be my network this time that is the problem – Simon Foster Jun 8 '11 at 11:17
Excellent. Thanks a lot – Simon Foster Jun 8 '11 at 11:29
On debian, the nagios-plugins-basic package (provder of the check-host-alive definition) also defines check-host-alive_4. – Hank Apr 23 '13 at 11:12

Glad you're participating in the IPv6 day and the IPv6 launch of the "most important internet sites". You are probably pinging a v6 site address when using the name without having v6 connectivity at your Nagios server. The good news is that it is over by midnight :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.