Просмотр исходного кода

Merge branch 'master' into 510-icmp-inconsistent-perfdata

Sebastian Wolf 6 лет назад
Родитель
Сommit
074b21006f
7 измененных файлов с 14 добавлено и 9 удалено
  1. 3 1
      NEWS
  2. 1 1
      NP-VERSION-GEN
  3. 1 1
      configure.ac
  4. BIN
      perlmods/Module-Build-0.4007.tar.gz
  5. 8 4
      plugins/check_http.c
  6. 0 1
      plugins/check_ping.c
  7. 1 1
      plugins/check_procs.c

+ 3 - 1
NEWS

@@ -1,7 +1,9 @@
 This file documents the major additions and syntax changes between releases.
 
-2.3.2 ????-??-??
+2.3.2 2020-??-??
 	FIXES
+	check_http: Fix host:port syntax when using -H (Isaac White)
+	perl dependencies: updated the included Module::Build to work with newer versions of perl (#505)
 	check_icmp: All performance data tags should show when packet loss is 100% (#510)
 
 2.3.1 2019-12-09

+ 1 - 1
NP-VERSION-GEN

@@ -6,7 +6,7 @@
 SRC_ROOT=`dirname $0`
 
 NPVF=NP-VERSION-FILE
-DEF_VER=2.3.0.git
+DEF_VER=2.3.1.git
 
 LF='
 '

+ 1 - 1
configure.ac

@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
-AC_INIT(nagios-plugins,2.3.0)
+AC_INIT(nagios-plugins,2.3.1)
 AC_CONFIG_SRCDIR(NPTest.pm)
 AC_CONFIG_FILES([gl/Makefile
 	nagios-plugins.spec])

BIN
perlmods/Module-Build-0.4007.tar.gz


+ 8 - 4
plugins/check_http.c

@@ -426,13 +426,17 @@ enable_ssl:
             break;
             /* Note: H, I, and u must be malloc'd or will fail on redirects */
         case 'H': /* Host Name (virtual host) */
-            host_name = strdup (optarg);
-            if (host_name[0] == '[') {
-                if ((p = strstr (host_name, "]:")) != NULL) /* [IPv6]:port */
+            host_name = strdup(optarg);
+            if (*host_name == '[') {
+                if ((p = strstr (host_name, "]:")) != NULL) /* [IPv6]:port */ {
                     server_port = atoi (p + 2);
+                    *++p = '\0'; // Set The host_name sans ":port"
+                }
             } else if ((p = strchr (host_name, ':')) != NULL
-                       && strchr (++p, ':') == NULL) /* IPv4:port or host:port */
+                       && strchr (++p, ':') == NULL) /* IPv4:port or host:port */ {
                 server_port = atoi (p);
+                *--p = '\0'; // Set The host_name sans ":port"
+            }
             break;
         case 'I': /* Server IP-address */
             server_address = strdup (optarg);

+ 0 - 1
plugins/check_ping.c

@@ -139,7 +139,6 @@ main (int argc, char **argv)
 		this_result = run_ping (cmd, addresses[i]);
 
 		if (pl == UNKNOWN_PACKET_LOSS || rta < 0.0) {
-			printf ("%s\n", cmd);
 			die (STATE_UNKNOWN,
 			           _("CRITICAL - Could not interpret output from ping command\n"));
 		}

+ 1 - 1
plugins/check_procs.c

@@ -855,7 +855,7 @@ print_help (void)
   printf ("   %s\n", _("Only scan for processes with args that contain the regex STRING."));
   printf (" %s\n", "-C, --command=COMMAND");
   printf ("   %s\n", _("Only scan for exact matches of COMMAND (without path)."));
-  printf (" %s\n", "-C, --exclude-process");
+  printf (" %s\n", "-X, --exclude-process");
   printf ("   %s\n", _("Exclude processes which match this comma separated list"));
   printf (" %s\n", "-k, --no-kthreads");
   printf ("   %s\n", _("Only scan for non kernel threads (works on Linux only)."));