mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-05-28 04:35:40 -04:00
Do not show RTA if no connection was possible
This commit is contained in:
parent
024d268386
commit
27d96dcf23
1 changed files with 10 additions and 4 deletions
|
|
@ -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("|");
|
||||
}
|
||||
printf(" %s\n", perfdata ("pl", (long) pl, "%",
|
||||
wpl>0?TRUE:FALSE, wpl,
|
||||
cpl>0?TRUE:FALSE, cpl,
|
||||
|
|
|
|||
Loading…
Reference in a new issue