summaryrefslogtreecommitdiffstats
path: root/plugins/check_fping.c
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2004-03-14 03:37:32 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2004-03-14 03:37:32 (GMT)
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 7b8e764..dff7ff9 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -165,8 +165,8 @@ textscan (char *buf)
165 die (status, 165 die (status,
166 _("FPING %s - %s (loss=%.0f%%, rta=%f ms)|%s %s\n"), 166 _("FPING %s - %s (loss=%.0f%%, rta=%f ms)|%s %s\n"),
167 state_text (status), server_name, loss, rta, 167 state_text (status), server_name, loss, rta,
168 perfdata ("loss", (int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100), 168 perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100),
169 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)); 169 fperfdata ("rta", rta/1.0e3, "s", wrta_p, wrta/1.0e3, crta_p, crta/1.0e3, TRUE, 0, FALSE, 0));
170 170
171 } 171 }
172 else if(strstr (buf, "xmt/rcv/%loss") ) { 172 else if(strstr (buf, "xmt/rcv/%loss") ) {
@@ -186,7 +186,7 @@ textscan (char *buf)
186 /* loss=%.0f%%;%d;%d;0;100 */ 186 /* loss=%.0f%%;%d;%d;0;100 */
187 die (status, _("FPING %s - %s (loss=%.0f%% )|%s\n"), 187 die (status, _("FPING %s - %s (loss=%.0f%% )|%s\n"),
188 state_text (status), server_name, loss , 188 state_text (status), server_name, loss ,
189 perfdata ("loss", (int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100)); 189 perfdata ("loss", (long int)loss, "%", wpl_p, wpl, cpl_p, cpl, TRUE, 0, TRUE, 100));
190 190
191 } 191 }
192 else { 192 else {
@@ -263,7 +263,7 @@ process_arguments (int argc, char **argv)
263 case 'c': 263 case 'c':
264 get_threshold (optarg, rv); 264 get_threshold (optarg, rv);
265 if (rv[RTA]) { 265 if (rv[RTA]) {
266 crta = 1e3 * strtod (rv[RTA], NULL); 266 crta = 1e-3 * strtod (rv[RTA], NULL);
267 crta_p = TRUE; 267 crta_p = TRUE;
268 rv[RTA] = NULL; 268 rv[RTA] = NULL;
269 } 269 }
@@ -276,7 +276,7 @@ process_arguments (int argc, char **argv)
276 case 'w': 276 case 'w':
277 get_threshold (optarg, rv); 277 get_threshold (optarg, rv);
278 if (rv[RTA]) { 278 if (rv[RTA]) {
279 wrta = 1e3 * strtod (rv[RTA], NULL); 279 wrta = 1e-3 * strtod (rv[RTA], NULL);
280 wrta_p = TRUE; 280 wrta_p = TRUE;
281 rv[RTA] = NULL; 281 rv[RTA] = NULL;
282 } 282 }