Hi Nagios-plugin support engineer,
The command below works correct:
nslookup -querytype=MX google.com
But check_dns give an error message:
/usr/local/nagios/libexec/check_dns -H google.com -q mx
DNS CRITICAL - query type of -querytype=MX was not found for google.com
What is wrong in the check_dns command?
The version of check_dns is v2.1.1
check_dns -q mx
Re: check_dns -q mx
You should update to a newer version (current version is 2.2.1). It seems they fixed some bugs in the last two years. And the current version works:
Code: Select all
/usr/local/nagios/libexec$ ./check_dns -H google.com -q mx
DNS OK: 0,012 seconds response time. google.com returns 10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 alt3.aspmx.l.google.com.,50 alt4.aspmx.l.google.com.|time=0,012469s;;;0,000000
-
- Posts: 4
- Joined: Mon Jan 04, 2016 7:27 am
Re: check_dns -q mx
I have downloaded, compiled en tested the Nagios plugins V2.2.1.
Indeed it works correct.
$ check_dns -H google.com -q mx
DNS OK: 0.190 seconds response time. google.com returns 10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 alt3.aspmx.l.google.com.,50 alt4.aspmx.l.google.com.|time=0.190218s;;;0.000000
Thanks
Indeed it works correct.
$ check_dns -H google.com -q mx
DNS OK: 0.190 seconds response time. google.com returns 10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 alt3.aspmx.l.google.com.,50 alt4.aspmx.l.google.com.|time=0.190218s;;;0.000000
Thanks
Re: check_dns -q mx
Thanks @metaldad!
@Hans van Leeuwen, Did you have any more questions or are we okay to close this thread?
@Hans van Leeuwen, Did you have any more questions or are we okay to close this thread?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_dns -q mx
Glad to see this is working for you. Let us know if you have other troubles.Hans van Leeuwen wrote:I have downloaded, compiled en tested the Nagios plugins V2.2.1.
Indeed it works correct.
$ check_dns -H google.com -q mx
DNS OK: 0.190 seconds response time. google.com returns 10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 alt3.aspmx.l.google.com.,50 alt4.aspmx.l.google.com.|time=0.190218s;;;0.000000
Thanks