From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- ...nagios-plugins-check_fping-timeout-1.4.13.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 web/attachments/302976-nagios-plugins-check_fping-timeout-1.4.13.patch (limited to 'web/attachments/302976-nagios-plugins-check_fping-timeout-1.4.13.patch') diff --git a/web/attachments/302976-nagios-plugins-check_fping-timeout-1.4.13.patch b/web/attachments/302976-nagios-plugins-check_fping-timeout-1.4.13.patch new file mode 100644 index 0000000..965631e --- /dev/null +++ b/web/attachments/302976-nagios-plugins-check_fping-timeout-1.4.13.patch @@ -0,0 +1,62 @@ +diff -urN nagios-plugins-1.4.13.ORIG/plugins/check_fping.c nagios-plugins-1.4.13/plugins/check_fping.c +--- nagios-plugins-1.4.13.ORIG/plugins/check_fping.c 2008-11-15 08:39:42.000000000 +0000 ++++ nagios-plugins-1.4.13/plugins/check_fping.c 2008-11-15 10:03:56.000000000 +0000 +@@ -46,7 +46,8 @@ + PACKET_COUNT = 1, + PACKET_SIZE = 56, + PL = 0, +- RTA = 1 ++ RTA = 1, ++ TARGET_TIMEOUT = 500 + }; + + int textscan (char *buf); +@@ -58,6 +59,7 @@ + char *server_name = NULL; + int packet_size = PACKET_SIZE; + int packet_count = PACKET_COUNT; ++int target_timeout = TARGET_TIMEOUT; + int verbose = FALSE; + int cpl; + int wpl; +@@ -92,8 +94,8 @@ + server = strscpy (server, server_name); + + /* compose the command */ +- asprintf (&command_line, "%s -b %d -c %d %s", PATH_TO_FPING, +- packet_size, packet_count, server); ++ asprintf (&command_line, "%s -t %d -b %d -c %d %s", PATH_TO_FPING, ++ target_timeout, packet_size, packet_count, server); + + if (verbose) + printf ("%s\n", command_line); +@@ -252,7 +254,7 @@ + } + + while (1) { +- c = getopt_long (argc, argv, "+hVvH:c:w:b:n:", longopts, &option); ++ c = getopt_long (argc, argv, "+hVvH:c:w:b:n:t:", longopts, &option); + + if (c == -1 || c == EOF || c == 1) + break; +@@ -313,6 +315,12 @@ + else + usage (_("Packet count must be a positive integer")); + break; ++ case 't': /* timeout in msec */ ++ if (is_intpos (optarg)) ++ target_timeout = atoi (optarg); ++ else ++ usage (_("Target timeout must be a positive integer")); ++ break; + } + } + +@@ -414,5 +422,5 @@ + print_usage (void) + { + printf (_("Usage:")); +- printf (" %s -w limit -c limit [-b size] [-n number]\n", progname); ++ printf (" %s -w limit -c limit [-b size] [-n number] [-t number]\n", progname); + } + -- cgit v1.2.3-74-g34f1