Page 1 of 1
DNS Check
Posted: Wed Oct 11, 2017 9:34 am
by inform
I get this error : DNS CRITICAL - expected '10.0.0.2' but got '10.0.0.2,10.0.0.30'
I got two domain controllors with DNS. What can i change so he will verifiy both dns and not only one?
Re: DNS Check
Posted: Wed Oct 11, 2017 12:52 pm
by dwasswa
Hi
@ inform ,
This means that you have a dynamic IP. It changed from 10.0.0.2 to 10.0.0.30.
Therefore use 10.0.0.30
Re: DNS Check
Posted: Wed Oct 11, 2017 3:08 pm
by inform
dwasswa wrote:Hi
@ inform ,
This means that you have a dynamic IP. It changed from 10.0.0.2 to 10.0.0.30.
Therefore use 10.0.0.30
I got two DNS servers which work together, one is 10.0.0.2 and other is 10.0.0.30, they both on static ip.
When in nagios, i want to check the dns service, i dont know how to enter both ips, and when i enter only one of thems, i get the error that is above.
Re: DNS Check
Posted: Wed Oct 11, 2017 4:09 pm
by dwasswa
Since you have 2 DNS servers that you want to check ,you should the use the advanced check_dns plugin for that.
It can be found at
Advanced Plugins
See usage:
Code: Select all
Checks DNS records including A, NS and MX records for domains
which the standard check_dns Nagios plugin can't do
Part of the Advanced Nagios Plugins Collection, download it here:
https://github.com/harisekhon/nagios-plugins
./check_dns.pl --help
Nagios Plugin to test a DNS record
Primarily written to check things like NS and MX records for domains
which the standard check_dns Nagios plugin can't do
usage: check_dns.pl [ options ]
-s --server DNS server(s) to query, can be a comma separated list of servers
-r --record DNS record to query
-q --type DNS query type (defaults to 'A' record)
-e --expected-result Expected results, comma separated
-R --expected-regex Expected regex to validate against each returned result
--no-uniq-results Test and display all results, not only unique results
-h --help Print description and usage options
-t --timeout Timeout in secs (default: 10)
-v --verbose Verbose mode
-V --version Print version and exit
Let me know if you have any questions