[Nagiosplug-devel] [ nagiosplug-Bugs-1511650 ] Release 1.4.2 check_dig -p Unknown argument

SourceForge.net noreply at sourceforge.net
Sat Jun 24 04:11:53 CEST 2006


Bugs item #1511650, was opened at 2006-06-23 19:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1511650&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: Argument proccessing
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Submitted By: Allan (allanbennett)
Assigned to: Nobody/Anonymous (nobody)
Summary: Release 1.4.2 check_dig -p Unknown argument

Initial Comment:
Results before patch:
[root at myserver ~]# /usr/lib/nagios/plugins/check_dig -
H mydnsserver.com -l google.com -p 5300
/usr/lib/nagios/plugins/check_dig: invalid option -- p
check_dig: Unknown argument - (null)
Usage: check_dig -H host -l lookup [-p <server port>] 
[-T <query type>]
                  [-w <warning interval>] [-c 
<critical interval>] [-t <timeout>]
                  [-a <expected answer address>] [-v]

I am not a programmer so please verify this patch is 
to your liking.

--- plugins/check_dig.c.orig    2005-01-26 
13:21:01.000000000 -0800
+++ plugins/check_dig.c 2006-06-23 
18:37:14.000000000 -0700
@@ -213,7 +213,7 @@
                return ERROR;

        while (1) {
-               c = getopt_long (argc, 
argv, "hVvt:l:H:w:c:T:a:", longopts, &option);
+               c = getopt_long (argc, 
argv, "hVvt:l:H:w:c:T:p:a:", longopts, &option);

                if (c == -1 || c == EOF)
                        break;

Results after patch:
[root at mybuild nagios-plugins-1.4.2]
# ./plugins/check_dig -H mydnsserver.com -l 
google.com -p 5300
DNS OK - 0.163 seconds response time (google.com.  
300 IN A 72.14.207.99)|time=0.162925s;;;0.000000

Allan Bennett
abennett at isomedia.com


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

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




More information about the Devel mailing list