فهرست منبع

Added performance data to check_ping (Christian Schneemann)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1990 f882894a-f735-0410-b71e-b25c423dba1c
Thomas Guyot-Sionnest 18 سال پیش
والد
کامیت
4d157889e3
3فایلهای تغییر یافته به همراه13 افزوده شده و 1 حذف شده
  1. 2 0
      NEWS
  2. 1 0
      THANKS.in
  3. 10 1
      plugins/check_ping.c

+ 2 - 0
NEWS

@@ -21,6 +21,8 @@ This file documents the major additions and syntax changes between releases.
 	check_mysql now try clearing password in processlist just like check_mysql_query
 	check_mysql and check_mysql_query now support sockets explicitely (-s, --socket)
 	negate now has the ability to replace the status text as well (-s, --substitute)
+	Added performance data to check_ping (Christian Schneemann)
+	Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
 
 1.4.11 13th December 2007
 	Fixed check_http regression in 1.4.10 where following redirects to

+ 1 - 0
THANKS.in

@@ -233,3 +233,4 @@ Alessandro Ren
 Harald Jenny
 Matthias Urlichs
 Jan Wagner
+Christian Schneemann

+ 10 - 1
plugins/check_ping.c

@@ -162,7 +162,16 @@ main (int argc, char **argv)
 							state_text (this_result), warn_text, pl, rta);
 		if (display_html == TRUE)
 			printf ("</A>");
-		printf ("\n");
+
+		/* Print performance data */
+		printf("|%s", fperfdata ("rta", (double) rta, "ms",
+		                          wrta>0?TRUE:FALSE, wrta,
+		                          crta>0?TRUE:FALSE, crta,
+		                          TRUE, 0, FALSE, 0));
+		printf(" %s\n", perfdata ("pl", (long) pl, "%",
+		                          wpl>0?TRUE:FALSE, wpl,
+		                          cpl>0?TRUE:FALSE, cpl,
+		                          TRUE, 0, FALSE, 0));
 
 		if (verbose >= 2)
 			printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl);