check_dig weirdness

Marc Powell marc at ena.com
Mon May 2 20:26:50 CEST 2005



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of schnitzel meister
> Sent: Monday, May 02, 2005 9:35 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] check_dig weirdness
> 
> Hi.
> I have a problem with check_dig intermittently failing.
> 
> If I run it from the command line, it also fails:
> # check_dig -H ip.of.dns.server -l www.google.com
> DNS OK - 0.066 seconds response time (www.google.com.  5 IN CNAME
> www.l.google.com.)|time=0.066127s;;;0.000000
> DNS OK - 0.131 seconds response time (www.google.com.  4 IN CNAME
> www.l.google.com.)|time=0.130893s;;;0.000000
> DNS OK - 0.095 seconds response time (www.google.com.  3 IN CNAME
> www.l.google.com.)|time=0.094743s;;;0.000000
> DNS OK - 0.112 seconds response time (www.google.com.  1 IN CNAME
> www.l.google.com.)|time=0.112004s;;;0.000000
> DNS UNKNOWN - 0.119 seconds response time (No ANSWER SECTION
> found)|time=0.119148s;;;0.000000
> DNS UNKNOWN - 0.255 seconds response time (No ANSWER SECTION
> found)|time=0.255138s;;;0.000000
> DNS UNKNOWN - 0.157 seconds response time (No ANSWER SECTION
> found)|time=0.156812s;;;0.000000
> DNS UNKNOWN - 0.188 seconds response time (No ANSWER SECTION
> found)|time=0.187612s;;;0.000000
> DNS UNKNOWN - 0.101 seconds response time (No ANSWER SECTION
> found)|time=0.100631s;;;0.000000
> DNS OK - 0.121 seconds response time (www.google.com.  822 IN CNAME
> www.l.google.com.)|time=0.120624s;;;0.000000
> DNS OK - 0.160 seconds response time (www.google.com.  821 IN CNAME
> www.l.google.com.)|time=0.159530s;;;0.000000
> DNS OK - 0.152 seconds response time (www.google.com.  819 IN CNAME
> www.l.google.com.)|time=0.151672s;;;0.000000
> 
> The problem happens when the number before IN CNAME gets to zero - but
> why?

Check_dig just parses the output from the dig binary and as such is
returning valid results, at least as far as the information it's
receiving from your nameserver. You'll see the same information in the
ANSWER SECTION of dig itself by issuing the following command --

bash-2.05a$ dig @your.nameserver www.google.com

; <<>> DiG 9.2.1 <<>> @nameserver www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4605
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         589     IN      CNAME   www.l.google.com.
www.l.google.com.       167     IN      A       64.233.187.99
www.l.google.com.       167     IN      A       64.233.187.104

;; AUTHORITY SECTION:
l.google.com.           35597   IN      NS      a.l.google.com.
l.google.com.           35597   IN      NS      b.l.google.com.
l.google.com.           35597   IN      NS      c.l.google.com.
l.google.com.           35597   IN      NS      e.l.google.com.

;; ADDITIONAL SECTION:
a.l.google.com.         63785   IN      A       216.239.53.9
b.l.google.com.         63785   IN      A       64.233.179.9
c.l.google.com.         63785   IN      A       64.233.161.9
e.l.google.com.         63785   IN      A       66.102.11.9

;; Query time: 3 msec
;; SERVER: nameserver
;; WHEN: Mon May  2 13:20:37 2005
;; MSG SIZE  rcvd: 212

The number you are seeing decrement is the number of seconds remaining
until your nameserver must refresh the results, as specified by Google.
It would appear that your nameserver is being slow to refresh when the
record expires or is having difficulty reaching Google's nameservers. In
either case, it isn't returning answers because the information it had
is stale and has been purged. I'd look at the nameserver and its log
files to make sure that there wasn't some bigger issue.

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list