summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 082c32f)
raw | patch | inline | side by side (parent: 082c32f)
author | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Fri, 14 Mar 2008 23:47:41 +0000 (23:47 +0000) | ||
committer | Matthias Eble <psychotrahe@users.sourceforge.net> | |
Fri, 14 Mar 2008 23:47:41 +0000 (23:47 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1943 f882894a-f735-0410-b71e-b25c423dba1c
NEWS | patch | blob | history | |
plugins/check_dig.c | patch | blob | history |
index b2ce70e7b15a8b8d16b366337a6fbf80f26ed7c7..57bf838904d7785e29ad295377f17c11393b2977 100644 (file)
--- a/NEWS
+++ b/NEWS
check_procs now accepts --ereg-argument-array for a regular expression match to the argument array
Reverted back to using pst3 for Solaris systems. Fixed issues re: -m64 needed to compile on 64bit systems
If applicable, Gettext linked dynamically instead of statically
+ check_dig can now pass arguments dig by using -A/--dig-arguments (#1874041/#1889453)
1.4.11 13th December 2007
Fixed check_http regression in 1.4.10 where following redirects to
diff --git a/plugins/check_dig.c b/plugins/check_dig.c
index 37a9a467f080c6402d1edf1cfb9048a6a10dd6d7..286efbebe5a7b33e74c2a834f1262b75fb95cb00 100644 (file)
--- a/plugins/check_dig.c
+++ b/plugins/check_dig.c
char *record_type = "A";
char *expected_address = NULL;
char *dns_server = NULL;
+char *dig_args = "";
int verbose = FALSE;
int server_port = DEFAULT_PORT;
double warning_interval = UNDEFINED;
usage_va(_("Could not parse arguments"));
/* get the command to run */
- asprintf (&command_line, "%s @%s -p %d %s -t %s",
- PATH_TO_DIG, dns_server, server_port, query_address, record_type);
+ asprintf (&command_line, "%s @%s -p %d %s -t %s %s",
+ PATH_TO_DIG, dns_server, server_port, query_address, record_type, dig_args);
alarm (timeout_interval);
gettimeofday (&tv, NULL);
{"warning", required_argument, 0, 'w'},
{"critical", required_argument, 0, 'c'},
{"timeout", required_argument, 0, 't'},
+ {"dig-arguments", required_argument, 0, 'A'},
{"verbose", no_argument, 0, 'v'},
{"version", no_argument, 0, 'V'},
{"help", no_argument, 0, 'h'},
return ERROR;
while (1) {
- c = getopt_long (argc, argv, "hVvt:l:H:w:c:T:p:a:", longopts, &option);
+ c = getopt_long (argc, argv, "hVvt:l:H:w:c:T:p:a:A:", longopts, &option);
if (c == -1 || c == EOF)
break;
usage_va(_("Timeout interval must be a positive integer - %s"), optarg);
}
break;
+ case 'A': /* dig arguments */
+ dig_args = strdup(optarg);
+ break;
case 'v': /* verbose */
verbose = TRUE;
break;
printf (" %s\n",_("record type to lookup (default: A)"));
printf (" %s\n","-a, --expected_address=STRING");
printf (" %s\n",_("an address expected to be in the answer section.if not set, uses whatever was in -l"));
+ printf (" %s\n","-A, --dig-arguments=STRING");
+ printf (" %s\n",_("pass STRING as argument(s) to dig"));
printf (_(UT_WARN_CRIT));
printf (_(UT_TIMEOUT), DEFAULT_SOCKET_TIMEOUT);
printf (_(UT_VERBOSE));
+ printf ("%s\n", _("Examples:"));
+ printf (" %s\n", "check_dig -H DNSSERVER -l www.example.com -A \"+tcp\"");
+ printf (" %s\n", "This will send a tcp query to DNSSERVER for www.example.com");
printf (_(UT_SUPPORT));
}