Răsfoiți Sursa

(#480) Fix ordering of check_icmp's performance data

madlohe 6 ani în urmă
părinte
comite
6a664f50af
2 a modificat fișierele cu 10 adăugiri și 5 ștergeri
  1. 3 0
      NEWS
  2. 7 5
      plugins-root/check_icmp.c

+ 3 - 0
NEWS

@@ -1,5 +1,8 @@
 This file documents the major additions and syntax changes between releases.
 
+2.3.1 xxxx-xx-xx
+	FIXES
+	check_icmp: Fixed backwards compatibility issue with performance data (#480)
 
 2.3.0 xxxx-xx-xx
 	ENHANCEMENTS

+ 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;;;; ",