Page 1 of 1

check_dns bug?

Posted: Tue Jun 10, 2014 11:29 am
by cshaffer
Setting up a check_dns command with a RedHat server as the client.

From the RedHat client.
This works OK.
-bash-3.00# nslookup 10.206.201.25
Server: 10.206.201.44
Address: 10.206.201.44#53

25.201.206.10.in-addr.arpa name = trans4m.ntnbower.com.

This works OK.
-bash-3.00# nslookup trans4m.ntnbower.com
Server: 10.206.201.44
Address: 10.206.201.44#53

Name: trans4m.ntnbower.com
Address: 10.206.201.25

BUT this fails
# /usr/local/nagios/libexec/check_dns -H 10.206.201.25 -a trans4m.ntnbower.com
DNS CRITICAL - expected 'trans4m.ntnbower.com' but got 'trans4m.ntnbower.com.'

It is failing because there is a period appended to the end of the host name when it returns. I can force it to work by appending a period to the end of the hostname in the check_dns command. Does anyone know why this might be happening? Is the WIndows Server appending the period? Or is something else happening?

Re: check_dns bug?

Posted: Tue Jun 10, 2014 3:54 pm
by sreinhardt
This is expected behavior with check_dns and has been for many years. The help documentation pretty clearly states that any reverse lookup must be expected to have a trailing period. I would actually love to change it, but I am certain that far too many checks will fail if I make the alteration.