From 4d157889e3018119e07bdcc7f48afde1422f7396 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Wed, 7 May 2008 10:01:48 +0000 Subject: 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 --- plugins/check_ping.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/check_ping.c b/plugins/check_ping.c index ac43a0c4..e22856da 100644 --- a/plugins/check_ping.c +++ b/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 (""); - 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); -- cgit v1.2.3-74-g34f1