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 | |
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
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | THANKS.in | 1 | ||||
-rw-r--r-- | plugins/check_ping.c | 11 |
3 files changed, 13 insertions, 1 deletions
@@ -21,6 +21,8 @@ This file documents the major additions and syntax changes between releases. | |||
21 | check_mysql now try clearing password in processlist just like check_mysql_query | 21 | check_mysql now try clearing password in processlist just like check_mysql_query |
22 | check_mysql and check_mysql_query now support sockets explicitely (-s, --socket) | 22 | check_mysql and check_mysql_query now support sockets explicitely (-s, --socket) |
23 | negate now has the ability to replace the status text as well (-s, --substitute) | 23 | negate now has the ability to replace the status text as well (-s, --substitute) |
24 | Added performance data to check_ping (Christian Schneemann) | ||
25 | Added support for --extra-opts in all C plugins (disabled by default, see configure --help) | ||
24 | 26 | ||
25 | 1.4.11 13th December 2007 | 27 | 1.4.11 13th December 2007 |
26 | Fixed check_http regression in 1.4.10 where following redirects to | 28 | Fixed check_http regression in 1.4.10 where following redirects to |
@@ -233,3 +233,4 @@ Alessandro Ren | |||
233 | Harald Jenny | 233 | Harald Jenny |
234 | Matthias Urlichs | 234 | Matthias Urlichs |
235 | Jan Wagner | 235 | Jan Wagner |
236 | Christian Schneemann | ||
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) | |||
162 | state_text (this_result), warn_text, pl, rta); | 162 | state_text (this_result), warn_text, pl, rta); |
163 | if (display_html == TRUE) | 163 | if (display_html == TRUE) |
164 | printf ("</A>"); | 164 | printf ("</A>"); |
165 | printf ("\n"); | 165 | |
166 | /* Print performance data */ | ||
167 | printf("|%s", fperfdata ("rta", (double) rta, "ms", | ||
168 | wrta>0?TRUE:FALSE, wrta, | ||
169 | crta>0?TRUE:FALSE, crta, | ||
170 | TRUE, 0, FALSE, 0)); | ||
171 | printf(" %s\n", perfdata ("pl", (long) pl, "%", | ||
172 | wpl>0?TRUE:FALSE, wpl, | ||
173 | cpl>0?TRUE:FALSE, cpl, | ||
174 | TRUE, 0, FALSE, 0)); | ||
166 | 175 | ||
167 | if (verbose >= 2) | 176 | if (verbose >= 2) |
168 | printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); | 177 | printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl); |