summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-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 @@
10* 10*
11*****************************************************************************/ 11*****************************************************************************/
12 12
13#define PROGNAME "check_pgsql" 13#define PROGNAME "check_ping"
14#define REVISION "$Revision$" 14#define REVISION "$Revision$"
15#define COPYRIGHT "1999-2001" 15#define COPYRIGHT "1999-2001"
16#define AUTHOR "Ethan Galstad/Karl DeBisschop" 16#define AUTHOR "Ethan Galstad/Karl DeBisschop"
@@ -390,12 +390,14 @@ run_ping (char *command_line)
390 390
391 /* get the percent loss statistics */ 391 /* get the percent loss statistics */
392 if (sscanf 392 if (sscanf
393 (input_buffer, 393 (input_buffer, "%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss",
394 "%*d packets transmitted, %*d packets received, +%*d errors, %d%% packet loss", 394 &pl) == 1
395 &pl) == 1 395 || sscanf
396 || sscanf (input_buffer, 396 (input_buffer, "%*d packets transmitted, %*d packets received, %d%% packet loss",
397 "%*d packets transmitted, %*d packets received, %d%% packet loss", 397 &pl) == 1
398 &pl) == 1) 398 || sscanf
399 (input_buffer, "%*d packets transmitted, %*d packets received, %d%% loss, time", &pl) == 1
400 )
399 continue; 401 continue;
400 402
401 /* get the round trip average */ 403 /* get the round trip average */
@@ -415,7 +417,10 @@ run_ping (char *command_line)
415 "round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f", 417 "round-trip min/avg/max/std-dev = %*f/%f/%*f/%*f",
416 &rta) == 1 418 &rta) == 1
417 || sscanf (input_buffer, "round-trip (ms) min/avg/max = %*f/%f/%*f", 419 || sscanf (input_buffer, "round-trip (ms) min/avg/max = %*f/%f/%*f",
418 &rta) == 1) 420 &rta) == 1
421 || sscanf (input_buffer, "rtt min/avg/max/mdev = %*f/%f/%*f/%*f ms",
422 &rta) == 1
423 )
419 continue; 424 continue;
420 } 425 }
421 426