Page 1 of 1
check_ping Hostname Not Resolving for .local Root
Posted: Fri Sep 04, 2015 1:16 pm
by andy.atc
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.
Re: check_ping Hostname Not Resolving for .local Root
Posted: Fri Sep 04, 2015 1:38 pm
by jdalrymple
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?
Re: check_ping Hostname Not Resolving for .local Root
Posted: Fri Sep 04, 2015 2:06 pm
by andy.atc
That's good to know...
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
Posted: Tue Sep 08, 2015 9:00 am
by tgriep
You may want to look at the following file and make sure the search domain and name server settings are correct for your environment.
Re: check_ping Hostname Not Resolving for .local Root
Posted: Tue Sep 08, 2015 10:20 am
by andy.atc
/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
Posted: Tue Sep 08, 2015 4:41 pm
by tgriep
Can you login to the system in a shell and run the following? Post the results here.
Replace server with a valid server name
Code: Select all
nslookup server.atc.local
/usr/local/nagios/libexec/check_icmp -H server.atc.local
Re: check_ping Hostname Not Resolving for .local Root
Posted: Wed Sep 16, 2015 2:52 pm
by andy.atc
Thanks for everyone's help. The HDD went out on my Nagios server and there aren't any problems with the fresh installation.