[Nagiosplug-devel] [ nagiosplug-Bugs-1511650 ] Release 1.4.2 check_dig -p Unknown argument
SourceForge.net
noreply at sourceforge.net
Sat Jun 24 04:44:14 CEST 2006
Bugs item #1511650, was opened at 2006-06-23 19:11
Message generated for change (Comment added) made by allanbennett
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
----------------------------------------------------------------------
>Comment By: Allan (allanbennett)
Date: 2006-06-23 19:44
Message:
Logged In: YES
user_id=1545223
Version 1.4.3
I can submit a larger patch for 1.4.3 to fix below if you
wish. -p -P and --port do not work.
Usage:check_dig -H host -l lookup [-p <server port>] [-T
<query type>] [-w <warning interval>] [-c
<critical interval>] [-t <timeout>] ]
Options:
-P, --port=INTEGER
----------------------------------------------------------------------
Comment By: Allan (allanbennett)
Date: 2006-06-23 19:22
Message:
Logged In: YES
user_id=1545223
Sorry, here is patch for 1.4.3
--- plugins/check_dig.c.orig 2005-11-13
16:51:44.000000000 -0800
+++ plugins/check_dig.c 2006-06-23 19:19:35.000000000 -0700
@@ -191,7 +191,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;
Current CVS is missing p as well
----------------------------------------------------------------------
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