aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_ping.c
diff options
context:
space:
mode:
authorGravatar Lorenz <12514511+RincewindsHat@users.noreply.github.com> 2022-01-03 13:48:39 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-03 13:48:39 +0100
commit2714df42fd27ec377228a102acff3744d6bff86d (patch)
tree3098fa3d9be4826e5da9d1df39ecf6b42bf3570b /plugins/check_ping.c
parent11af74de386ba7c02d5d0e53f2500b5029a4537d (diff)
parent78a999edd4dd3305ef8fa3e06c43f6a893fb6fea (diff)
downloadmonitoring-plugins-2714df42fd27ec377228a102acff3744d6bff86d.tar.gz
Merge branch 'master' into master
Diffstat (limited to 'plugins/check_ping.c')
-rw-r--r--plugins/check_ping.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index 423ecbe5..ba7af373 100644
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
@@ -37,6 +37,8 @@ const char *email = "devel@monitoring-plugins.org";
#include "popen.h"
#include "utils.h"
+#include <signal.h>
+
#define WARN_DUPLICATES "DUPLICATES FOUND! "
#define UNKNOWN_TRIP_TIME -1.0 /* -1 seconds */
@@ -163,10 +165,14 @@ main (int argc, char **argv)
printf ("</A>");
/* Print performance data */
- printf("|%s", fperfdata ("rta", (double) rta, "ms",
- wrta>0?TRUE:FALSE, wrta,
- crta>0?TRUE:FALSE, crta,
- TRUE, 0, FALSE, 0));
+ if (pl != 100) {
+ printf("|%s", fperfdata ("rta", (double) rta, "ms",
+ wrta>0?TRUE:FALSE, wrta,
+ crta>0?TRUE:FALSE, crta,
+ TRUE, 0, FALSE, 0));
+ } else {
+ printf("| rta=U;%f;%f;;", wrta, crta);
+ }
printf(" %s\n", perfdata ("pl", (long) pl, "%",
wpl>0?TRUE:FALSE, wpl,
cpl>0?TRUE:FALSE, cpl,