diff options
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 139aeff3..a57edef4 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -1272,7 +1272,7 @@ static int send_icmp_ping(const check_icmp_socket_set sockset, ping_target *host | |||
1272 | data.ping_id = 10; /* host->icmp.icmp_sent; */ | 1272 | data.ping_id = 10; /* host->icmp.icmp_sent; */ |
1273 | memcpy(&data.stime, ¤t_time, sizeof(current_time)); | 1273 | memcpy(&data.stime, ¤t_time, sizeof(current_time)); |
1274 | 1274 | ||
1275 | socklen_t addrlen = 0; | 1275 | socklen_t addrlen; |
1276 | 1276 | ||
1277 | if (host->address.ss_family == AF_INET) { | 1277 | if (host->address.ss_family == AF_INET) { |
1278 | struct icmp *icp = (struct icmp *)buf; | 1278 | struct icmp *icp = (struct icmp *)buf; |
@@ -2253,10 +2253,10 @@ mp_subcheck evaluate_target(ping_target target, check_icmp_mode_switches modes, | |||
2253 | 2253 | ||
2254 | if (rta >= crit.rta) { | 2254 | if (rta >= crit.rta) { |
2255 | sc_rta = mp_set_subcheck_state(sc_rta, STATE_CRITICAL); | 2255 | sc_rta = mp_set_subcheck_state(sc_rta, STATE_CRITICAL); |
2256 | xasprintf(&sc_rta.output, "%s > %0.3fms", sc_rta.output, crit.rta / 1000); | 2256 | xasprintf(&sc_rta.output, "%s > %0.3fms", sc_rta.output, (double) crit.rta / 1000); |
2257 | } else if (rta >= warn.rta) { | 2257 | } else if (rta >= warn.rta) { |
2258 | sc_rta = mp_set_subcheck_state(sc_rta, STATE_WARNING); | 2258 | sc_rta = mp_set_subcheck_state(sc_rta, STATE_WARNING); |
2259 | xasprintf(&sc_rta.output, "%s > %0.3fms", sc_rta.output, warn.rta / 1000); | 2259 | xasprintf(&sc_rta.output, "%s > %0.3fms", sc_rta.output, (double) warn.rta / 1000); |
2260 | } | 2260 | } |
2261 | 2261 | ||
2262 | if (packet_loss < 100) { | 2262 | if (packet_loss < 100) { |
@@ -2378,14 +2378,14 @@ mp_subcheck evaluate_target(ping_target target, check_icmp_mode_switches modes, | |||
2378 | if (modes.score_mode) { | 2378 | if (modes.score_mode) { |
2379 | mp_subcheck sc_score = mp_subcheck_init(); | 2379 | mp_subcheck sc_score = mp_subcheck_init(); |
2380 | sc_score = mp_set_subcheck_default_state(sc_score, STATE_OK); | 2380 | sc_score = mp_set_subcheck_default_state(sc_score, STATE_OK); |
2381 | xasprintf(&sc_score.output, "Score %u", score); | 2381 | xasprintf(&sc_score.output, "Score %f", score); |
2382 | 2382 | ||
2383 | if (score <= crit.score) { | 2383 | if (score <= crit.score) { |
2384 | sc_score = mp_set_subcheck_state(sc_score, STATE_CRITICAL); | 2384 | sc_score = mp_set_subcheck_state(sc_score, STATE_CRITICAL); |
2385 | xasprintf(&sc_score.output, "%s < %u", sc_score.output, crit.score); | 2385 | xasprintf(&sc_score.output, "%s < %f", sc_score.output, crit.score); |
2386 | } else if (score <= warn.score) { | 2386 | } else if (score <= warn.score) { |
2387 | sc_score = mp_set_subcheck_state(sc_score, STATE_WARNING); | 2387 | sc_score = mp_set_subcheck_state(sc_score, STATE_WARNING); |
2388 | xasprintf(&sc_score.output, "%s < %u", sc_score.output, warn.score); | 2388 | xasprintf(&sc_score.output, "%s < %f", sc_score.output, warn.score); |
2389 | } | 2389 | } |
2390 | 2390 | ||
2391 | if (packet_loss < 100) { | 2391 | if (packet_loss < 100) { |