[Nagiosplug-devel] [ nagiosplug-Patches-1889955 ] check_dig: patch to make dig honor -t option

SourceForge.net noreply at sourceforge.net
Sat Feb 9 02:27:41 CET 2008


Patches item #1889955, was opened at 2008-02-09 14:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1889955&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: Bugfix
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jethro Carr (dodocaptain)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_dig: patch to make dig honor -t option

Initial Comment:
When a timeout value is specified with the -t option, dig will sometimes timeout before the timer is actually reached.

The problem occurs because the check_dig plugin does not pass the specified timeout value to dig, leaving dig to timeout with it's default value which seems to be around 10-15seconds.

To reproduce:
time ./check_dig -H 127.0.0.2 -l www.google.com -t 30

It will not run for 30secs, which is the expected behaviour.

The following will work, because the timeout is less than the default dig timeout, so the plugin cancels the dig command:
time ./check_dig -H 127.0.0.2 -l www.google.com -t 2


I have made a fix, and attached a patch for it against 1.4.11.

This fix passes the timeout value to dig, and sets the number of retries which tends to vary from system to system by default.

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

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




More information about the Devel mailing list