aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_fping.c
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2004-03-14 03:37:32 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2004-03-14 03:37:32 +0000
commitb86b521b38a993b49e03f827859aea672fdfa806 (patch)
treee45d3e3bd65717a79dccfabc01ce555ac433de93 /plugins/check_fping.c
parent3bb09aa98c5a2ae3477f2c51370390deea2959d7 (diff)
downloadmonitoring-plugins-b86b521b38a993b49e03f827859aea672fdfa806.tar.gz
use fperfdata
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@848 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_fping.c')
-rw-r--r--plugins/check_fping.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 7b8e764f..dff7ff99 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -165,8 +165,8 @@ textscan (char *buf)
die (status,
_("FPING %s - %s (loss=%.0f%%, rta=%f ms)|%s %s\n"),
state_text (status), server_name, loss, rta,
- perfdata ("loss", (int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100),
- perfdata ("rta", (long int)(rta*1.0e3), "us", wrta_p, (long int)(wrta*1.0e3), crta_p, (long int)(crta*1.0e3), TRUE, 0, FALSE, 0));
+ perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100),
+ fperfdata ("rta", rta/1.0e3, "s", wrta_p, wrta/1.0e3, crta_p, crta/1.0e3, TRUE, 0, FALSE, 0));
}
else if(strstr (buf, "xmt/rcv/%loss") ) {
@@ -186,7 +186,7 @@ textscan (char *buf)
/* loss=%.0f%%;%d;%d;0;100 */
die (status, _("FPING %s - %s (loss=%.0f%% )|%s\n"),
state_text (status), server_name, loss ,
- perfdata ("loss", (int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100));
+ perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100));
}
else {
@@ -263,7 +263,7 @@ process_arguments (int argc, char **argv)
case 'c':
get_threshold (optarg, rv);
if (rv[RTA]) {
- crta = 1e3 * strtod (rv[RTA], NULL);
+ crta = 1e-3 * strtod (rv[RTA], NULL);
crta_p = TRUE;
rv[RTA] = NULL;
}
@@ -276,7 +276,7 @@ process_arguments (int argc, char **argv)
case 'w':
get_threshold (optarg, rv);
if (rv[RTA]) {
- wrta = 1e3 * strtod (rv[RTA], NULL);
+ wrta = 1e-3 * strtod (rv[RTA], NULL);
wrta_p = TRUE;
rv[RTA] = NULL;
}