The check_ping and check_icmp plugins cannot resolve addresses with ".local" as the top-level domain. I setup our internal network with the domain "ATC.LOCAL". So, a machine has the address SRV01.ATC.LOCAL. check_ping returns "Failed to resolve srv01.atc.local" I added a CNAME record so SRV01.ADVANCETHERMAL.COM points to SRV01.ATC.LOCAL, and check_ping works fine (with SRV01.ADVANCETHERMAL.COM as the Host). Specifying the IP address directly works as well. (ping, nslookup and dig have no problems resolving either address)
I'd think check_ping and check_icmp would just pass the host to /bin/ping but it appears to be doing some sort of mangling that isn't expecting ".local" at the end of a hostname. I am using version 1.5 as part of the Ubuntu 14.04 distro.
check_ping Hostname Not Resolving for .local Root
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_ping Hostname Not Resolving for .local Root
You can't imagine how many thousands of Nagios customers would be complaining about that if it were truly a bug, myself included (see attachment). Note I use check_ping in my generic template.
This problem is unique to your environment, although I'm not sure why. What version of plugins do you have installed?
This problem is unique to your environment, although I'm not sure why. What version of plugins do you have installed?
Re: check_ping Hostname Not Resolving for .local Root
That's good to know...
aptitude reports 1.5-3ubuntu1
check_ping --version reports "check_ping v1.5 (nagios-plugins 1.5)"
aptitude reports 1.5-3ubuntu1
check_ping --version reports "check_ping v1.5 (nagios-plugins 1.5)"
Re: check_ping Hostname Not Resolving for .local Root
You may want to look at the following file and make sure the search domain and name server settings are correct for your environment.
Code: Select all
/etc/resolv.conf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_ping Hostname Not Resolving for .local Root
/etc/resolv.conf is good. All commands show everything is in order. It is only check_ping and check_icmp that don't like the *.atc.local domain.
Re: check_ping Hostname Not Resolving for .local Root
Can you login to the system in a shell and run the following? Post the results here.
Replace server with a valid server name
Replace server with a valid server name
Code: Select all
nslookup server.atc.local
/usr/local/nagios/libexec/check_icmp -H server.atc.local
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_ping Hostname Not Resolving for .local Root
Thanks for everyone's help. The HDD went out on my Nagios server and there aren't any problems with the fresh installation.