Page 3 of 3

Re: Incorrect report

Posted: Tue Jan 21, 2014 4:20 pm
by tmcdonald
What exact check_dns command are you using? What is the output?

Re: Incorrect report

Posted: Tue Jan 21, 2014 4:28 pm
by lmiltchev
The order matters, that's why if your IPs are not in the correct order, the check will return "CRITICAL".

Example:

Code: Select all

[root@testbox libexec]# nslookup amazon.com
Server:         192.168.5.2
Address:        192.168.5.2#53

Non-authoritative answer:
Name:   amazon.com
Address: 72.21.194.212
Name:   amazon.com
Address: 72.21.215.232
Name:   amazon.com
Address: 176.32.98.166
Name:   amazon.com
Address: 205.251.242.54

Code: Select all

[root@testbox libexec]# ./check_dns -H amazon.com
DNS OK: 0.006 seconds response time. amazon.com returns 176.32.98.166,205.251.242.54,72.21.194.212,72.21.215.232|time=0.006434s;;;0.000000
If I use the same order, the check returns "OK":

Code: Select all

[root@testbox libexec]# ./check_dns -H amazon.com -a 176.32.98.166,205.251.242.54,72.21.194.212,72.21.215.232
DNS OK: 0.006 seconds response time. amazon.com returns 176.32.98.166,205.251.242.54,72.21.194.212,72.21.215.232|time=0.005897s;;;0.000000
But if I swap the IPs, I get "CRITICAL":

Code: Select all

[root@testbox libexec]# ./check_dns -H amazon.com -a 72.21.215.232,176.32.98.166,205.251.242.54,72.21.194.212
DNS CRITICAL - expected '72.21.215.232,176.32.98.166,205.251.242.54,72.21.194.212' but got '176.32.98.166,205.251.242.54,72.21.194.212,72.21.215.232'

Re: Incorrect report

Posted: Thu Jan 23, 2014 11:42 pm
by chitrangada
Okay..! Now i understand how it works and will use it accordingly. Now if you want you can close the topic.
Thanks for sharing useful information. :)