summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3bb09aa)
raw | patch | inline | side by side (parent: 3bb09aa)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sun, 14 Mar 2004 03:37:32 +0000 (03:37 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Sun, 14 Mar 2004 03:37:32 +0000 (03:37 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@848 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_fping.c | patch | blob | history |
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 7b8e764fb0b490a50d997238d2ecb5d072586ad5..dff7ff992f4f0b709a141a286f9bee193f7646d2 100644 (file)
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
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") ) {
/* 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 {
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;
}
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;
}