check_ping Hostname Not Resolving for .local Root

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
andy.atc
Posts: 4
Joined: Fri Sep 04, 2015 12:57 pm

check_ping Hostname Not Resolving for .local Root

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: check_ping Hostname Not Resolving for .local Root

Post 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?
Attachments
Clipboard01.jpg
andy.atc
Posts: 4
Joined: Fri Sep 04, 2015 12:57 pm

Re: check_ping Hostname Not Resolving for .local Root

Post 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)"
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_ping Hostname Not Resolving for .local Root

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

Code: Select all

/etc/resolv.conf
Be sure to check out our Knowledgebase for helpful articles and solutions!
andy.atc
Posts: 4
Joined: Fri Sep 04, 2015 12:57 pm

Re: check_ping Hostname Not Resolving for .local Root

Post 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.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_ping Hostname Not Resolving for .local Root

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
andy.atc
Posts: 4
Joined: Fri Sep 04, 2015 12:57 pm

Re: check_ping Hostname Not Resolving for .local Root

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