diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-05-07 10:01:48 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-05-07 10:01:48 +0000 |
commit | 4d157889e3018119e07bdcc7f48afde1422f7396 (patch) | |
tree | 6a2ecdbe45263f04549839b09290c161d00e4284 /plugins/check_ping.c | |
parent | 82f8c52fbdca00bd8118bab3cee977da14757818 (diff) | |
download | monitoring-plugins-4d157889e3018119e07bdcc7f48afde1422f7396.tar.gz |
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
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r-- | plugins/check_ping.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 ("</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); |