Page 1 of 1

check_dns and MX

Posted: Fri May 22, 2015 6:18 am
by tecnalb
I was trying to setup a check to test an MX for change... essentially was waiting for a change to take place, and thought I would put in XI so that I was alerted.

check on my NXI server I did this:

check_dns -H <domain> -q MX and a valid record name is returned.


Now, if I wanted to expect a result that help says "-a" and a HOST would end with (.)

check_dns -H <domain> -q MX -a <hostname>.

I get "CRITICAL - Plugin timed out while executing system call" after about 15 seconds.


So then I place in a bogus hostname after the "-a"

check_dns -H <domain> -q MX -a goob.blahblah.com.

I get "check_dns: Invalid hostname/address - GOob.blahblah.com." , and also notice the first two characters get capitalized in the result.

Re: check_dns and MX

Posted: Fri May 22, 2015 1:21 pm
by abrist
What version of check_dns are you running?

Code: Select all

check_dns -V

Re: check_dns and MX

Posted: Fri May 22, 2015 6:59 pm
by tecnalb
# /usr/local/nagios/libexec/check_dns -V
check_dns v2.0.3 (nagios-plugins 2.0.3)

Re: check_dns and MX

Posted: Tue May 26, 2015 9:29 am
by jdalrymple
Put your "-q MX" at the end of your command. Something in the -q argument parsing isn't working right when it does an uppercase function. It's turning your -a into a -A.

I'll file a bug, but that's an easy workaround.