aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2002-04-23 12:50:51 +0000
committerGravatar Subhendu Ghosh <sghosh@users.sourceforge.net> 2002-04-23 12:50:51 +0000
commit288f40a0bbd8babac9dfdf5facdbd9f37bd1841f (patch)
treed2944324efe23a89e520e36fb089e2a4b9e66ec5
parent58fad23452357dae19db896c06c025592f6d34c9 (diff)
downloadmonitoring-plugins-288f40a0bbd8babac9dfdf5facdbd9f37bd1841f.tar.gz
corrected program name and added rtt patch for RH7.2+beta
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@17 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_ping.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index b61b41b5..3a02597c 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -10,7 +10,7 @@
*
*****************************************************************************/
-#define PROGNAME "check_pgsql"
+#define PROGNAME "check_ping"
#define REVISION "$Revision$"
#define COPYRIGHT "1999-2001"
#define AUTHOR "Ethan Galstad/Karl DeBisschop"
@@ -390,12 +390,14 @@ run_ping (char *command_line)
/* get the percent loss statistics */
if (sscanf
- (input_buffer,
- "%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",
- &pl) == 1
- || sscanf (input_buffer,
- "%*d packets transmitted, %*d packets received, %d%% packet loss",
- &pl) == 1)
+ (input_buffer, "%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",
+ &pl) == 1
+ || sscanf
+ (input_buffer, "%*d packets transmitted, %*d packets received, %d%% packet loss",
+ &pl) == 1
+ || sscanf
+ (input_buffer, "%*d packets transmitted, %*d packets received, %d%% loss, time", &pl) == 1
+ )
continue;
/* get the round trip average */
@@ -415,7 +417,10 @@ run_ping (char *command_line)
"round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f",
&rta) == 1
|| sscanf (input_buffer, "round-trip (ms) min/avg/max = %*f/%f/%*f",
- &rta) == 1)
+ &rta) == 1
+ || sscanf (input_buffer, "rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms",
+ &rta) == 1
+ )
continue;
}