Przeglądaj źródła

Add state to check_mrtg status output

Fix for #125
John C. Frickson 9 lat temu
rodzic
commit
f1c1fae8c6
2 zmienionych plików z 3 dodań i 1 usunięć
  1. 2 0
      NEWS
  2. 1 1
      plugins/check_mrtg.c

+ 2 - 0
NEWS

@@ -3,6 +3,8 @@ This file documents the major additions and syntax changes between releases.
 2.x.x xxxx-xx-xx
 	FIXES
 	check_http: -e breaks -f
+	check_mrtg: Add state to status output
+
 
 2.1.4 2016-11-17
 	FIXES

+ 1 - 1
plugins/check_mrtg.c

@@ -148,7 +148,7 @@ main (int argc, char **argv)
 	else if (rate > value_warning_threshold)
 		result = STATE_WARNING;
 
-	printf("%s. %s = %lu %s|%s\n",
+	printf("%s - %s. %s = %lu %s|%s\n", state_text(result),
 	       (use_average == TRUE) ? _("Avg") : _("Max"),
 	       label, rate, units,
 	       perfdata(label, (long) rate, units,