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

Merge pull request #501 from nagios-plugins/maint

merge for release 2.3.1
Sebastian Wolf 6 лет назад
Родитель
Сommit
b93d86724f
2 измененных файлов с 12 добавлено и 5 удалено
  1. 5 0
      NEWS
  2. 7 5
      plugins-root/check_icmp.c

+ 5 - 0
NEWS

@@ -1,7 +1,12 @@
 This file documents the major additions and syntax changes between releases.
 
+2.3.1 2019-12-09
+	FIXES
+	check_icmp: Fixed backward-compatibility issue with performance data (#480)
 
 2.3.0 2019-12-04
+Note: nagios-plugins 2.3.0 introduced a backward-compatibility issue for performance data graphs produced by check_icmp.
+Anyone upgrading from an older version of nagios-plugins should upgrade directly to >=2.3.1.
 	ENHANCEMENTS
 	Added a plugin "remove_perfdata" to remove perfdata from another plugin's output
 	Added a plugin "check_ssl_validity" which verifies a certificate through CRL or OCSP

+ 7 - 5
plugins-root/check_icmp.c

@@ -1593,17 +1593,19 @@ static void finish(int sig) {
       puts("");
     }
     if (rta_mode && host->pl < 100) {
-      printf("%srta=%0.3fms;%0.3f;%0.3f;0; %srtmax=%0.3fms;;;; "
-             "%srtmin=%0.3fms;;;; ",
+      printf("%srta=%0.3fms;%0.3f;%0.3f;0; ",
              (targets > 1) ? host->name : "", (float)host->rta / 1000,
-             (float)warn.rta / 1000, (float)crit.rta / 1000,
-             (targets > 1) ? host->name : "", (float)host->rtmax / 1000,
-             (targets > 1) ? host->name : "", (float)host->rtmin / 1000);
+             (float)warn.rta / 1000, (float)crit.rta / 1000);
     }
     if (pl_mode) {
       printf("%spl=%u%%;%u;%u;0;100 ", (targets > 1) ? host->name : "",
              host->pl, warn.pl, crit.pl);
     }
+    if (rta_mode && host->pl < 100) {
+      printf("%srtmax=%0.3fms;;;; %srtmin=%0.3fms;;;; ",
+             (targets > 1) ? host->name : "", (float)host->rtmax / 1000,
+             (targets > 1) ? host->name : "", (float)host->rtmin / 1000);
+    }
     if (jitter_mode && host->pl < 100) {
       printf("%sjitter_avg=%0.3fms;%0.3f;%0.3f;0; %sjitter_max=%0.3fms;;;; "
              "%sjitter_min=%0.3fms;;;; ",