[Nagiosplug-devel] [ nagiosplug-Bugs-1396593 ] Perfdata Output by check_dns

SourceForge.net noreply at sourceforge.net
Wed Mar 22 06:08:20 CET 2006


Bugs item #1396593, was opened at 2006-01-04 07:06
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1396593&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General plugin execution
Group: Release (specify)
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Tobias Mucke (mucke)
>Assigned to: Ton Voon (tonvoon)
Summary: Perfdata Output by check_dns

Initial Comment:
Hi everybody,

just a little bug in perfdata output of the plugin
check_dns. I'am using 1.4.2.

Example for dns reverse lookup:

/opt/nagios/plugins/check_dns -H IP -t 10
DNS OK: 0.004 seconds response time IP returns FQHN.
|time=0.003981s;;;0.000000

Between plugin output and perfdata output is a  	line
break, so perfdata will not get processed by Nagios.

If I call it like a dns forward lookup, there is no
line break.

/opt/nagios/plugins/check_dns -H FQHN -a IP -t 10
DNS OK: 0.005 seconds response time FQHN returns
IP|time=0.004883s;;;0.000000

By the way, it would be very nice to really test dns
forward lookups by check_dns. I tried it the following,
but this doesn't work, of course. Although it seems
strange that FQHN ist not FQHN.

/opt/nagios/plugins/check_dns -H IP -a FQHN -t 10
DNS CRITICAL - expected FQHN but got FQHN.

Thanks a lot.

Tobias


----------------------------------------------------------------------

>Comment By: Ton Voon (tonvoon)
Date: 2006-03-22 14:07

Message:
Logged In: YES 
user_id=664364

Tobias, Mark,

Thanks for the report and the patch. This appears to already be fixed in CVS. 
Please try the snapshot at http://nagiosplug.sf.net/snapshot. I'll mark the call 
in PENDING - please change if there is still an error.

Tobais, the reverse lookup does work, but requires a '.' at the end - this is 
due to the output being given back from nslookup. I've changed the output 
so that the strings are quoted. Eg,

DNS CRITICAL - expected 'www.apple.com' but got 'www.apple.com.'

Ton

----------------------------------------------------------------------

Comment By: Mark Favas (mfavas)
Date: 2006-01-15 02:56

Message:
Logged In: YES 
user_id=44979

Fixed linebreak issue:

diff -c check_dns.c.orig check_dns.c
*** check_dns.c.orig    Sun Jan 15 10:30:55 2006
--- check_dns.c Sun Jan 15 10:55:07 2006
***************
*** 173,178 ****
--- 173,179 ----

        /* If we got here, we should have an address string,
                 and we can segfault if we do not */
+       strip(address);
        if (address==NULL || strlen(address)==0)
                die (STATE_CRITICAL,
                     _("DNS CRITICAL - '%s' output parsing
exited with no address\n"),


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1396593&group_id=29880




More information about the Devel mailing list