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.
check_dns and MX
Re: check_dns and MX
What version of check_dns are you running?
Code: Select all
check_dns -V
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: check_dns and MX
# /usr/local/nagios/libexec/check_dns -V
check_dns v2.0.3 (nagios-plugins 2.0.3)
check_dns v2.0.3 (nagios-plugins 2.0.3)
-
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_dns and MX
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.
I'll file a bug, but that's an easy workaround.