[Nagiosplug-help] check_dig always returning Warning and "dig returned an error response"
Andy Shellam
andy-lists at networkmail.eu
Mon Mar 23 22:09:23 CET 2009
Ah, never mind. I symlinked dig, host and nslookup from
/opt/nmail/bind/bin to /bin, re-compiled the plugins and got check_dns
compiled successfully.
Then when I turned on the verbose option on check_dns, it threw up an
error about libcrypto being missing, so I added my OpenSSL library path
to /etc/ld.so.conf, and it worked. check_dig then worked as well, even
though I didn't get any errors relating to libcrypto.
Andy
Andy Shellam wrote:
> Hi,
>
> I've just compiled the Nagios Plugins 1.4.13 on 2 CentOS 5.2 boxes
> with BIND 9.6.0-p1 (and dig from the same version.)
>
> I'm not sure why but the check_dns plugin didn't build (presumably
> because dig, host and nslookup aren't in my PATH.) Anyway I passed
> the --with-dig-command configure option when I built the plugins and
> check_dig compiled successfully. However I cannot get it to work - it
> always returns a WARNING, saying "dig returned an error response."
> Yet if I run the dig command manually, it succeeds.
>
> Note that I haven't yet added these 2 new boxes to the recursion ACL
> on my nameservers, so I'm passing +norecurse to dig to avoid the
> warning about recursion not available in case that was throwing up a
> red herring.
>
> E.g.:
>
> -----
> # /opt/nmail/nagios/libexec/check_dig -H radio1.aspiredns.eu -l
> albury.networkmail.eu -a "95.172.10.26" -A "+norecurse" -v
> /opt/nmail/bind/bin/dig @radio1.aspiredns.eu -p 53
> albury.networkmail.eu -t A +norecurse
> Looking for: '95.172.10.26'
> DNS WARNING - 0.001 seconds response time (dig returned an error
> status)|time=0.000840s;;;0.000000
> -----
>
> If I run the dig command manually:
>
> -----
> # /opt/nmail/bind/bin/dig @radio1.aspiredns.eu -p 53
> albury.networkmail.eu -t A +norecurse
> ; <<>> DiG 9.6.0-P1 <<>> @radio1.aspiredns.eu -p 53
> albury.networkmail.eu -t A +norecurse
> ; (1 server found)
> ;; global options: +cmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36033
> ;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
>
> ;; QUESTION SECTION:
> ;albury.networkmail.eu. IN A
>
> ;; ANSWER SECTION:
> albury.networkmail.eu. 86400 IN A 95.172.10.26
>
> ;; AUTHORITY SECTION:
> networkmail.eu. 259200 IN NS radio2.aspiredns.eu.
> networkmail.eu. 259200 IN NS radio1.aspiredns.eu.
>
> ;; ADDITIONAL SECTION:
> radio1.aspiredns.eu. 86400 IN A 91.194.74.236
> radio2.aspiredns.eu. 86400 IN A 91.194.74.235
>
> ;; Query time: 1 msec
> ;; SERVER: 91.194.74.236#53(91.194.74.236)
> ;; WHEN: Mon Mar 23 20:54:21 2009
> ;; MSG SIZE rcvd: 139
> -----
>
> Any ideas why this isn't working correctly? And what check_dns needs
> to build?
>
> Many thanks,
> Andy
>
More information about the Help
mailing list