diff options
author | Danijel Tasov <m@rbfh.de> | 2023-10-04 11:52:09 +0200 |
---|---|---|
committer | Danijel Tasov <m@rbfh.de> | 2023-10-04 11:52:09 +0200 |
commit | 1f49981982cb47227457f8b37997f5639fceb778 (patch) | |
tree | bf16ee53a7cfe7639824801d42316578803b311e | |
parent | 843c0bfa46ed6d02c9b4998f66a9cc3a2834271d (diff) | |
download | monitoring-plugins-1f49981982cb47227457f8b37997f5639fceb778.tar.gz |
readability improvements
Signed-off-by: Danijel Tasov <m@rbfh.de>
-rw-r--r-- | plugins-root/check_icmp.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 4a72315d..246b4665 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -1478,13 +1478,31 @@ finish(int sig) | |||
1478 | printf("%spl=%u%%;%u;%u;0;100 ", (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl); | 1478 | printf("%spl=%u%%;%u;%u;0;100 ", (targets > 1) ? host->name : "", host->pl, warn.pl, crit.pl); |
1479 | } | 1479 | } |
1480 | if (jitter_mode && host->pl<100) { | 1480 | if (jitter_mode && host->pl<100) { |
1481 | printf("%sjitter_avg=%0.3fms;%0.3f;%0.3f;0; %sjitter_max=%0.3fms;;;; %sjitter_min=%0.3fms;;;; ", (targets > 1) ? host->name : "", (float)host->jitter, (float)warn.jitter, (float)crit.jitter, (targets > 1) ? host->name : "", (float)host->jitter_max / 1000, (targets > 1) ? host->name : "",(float)host->jitter_min / 1000); | 1481 | printf("%sjitter_avg=%0.3fms;%0.3f;%0.3f;0; %sjitter_max=%0.3fms;;;; %sjitter_min=%0.3fms;;;; ", |
1482 | (targets > 1) ? host->name : "", | ||
1483 | (float)host->jitter, | ||
1484 | (float)warn.jitter, | ||
1485 | (float)crit.jitter, | ||
1486 | (targets > 1) ? host->name : "", | ||
1487 | (float)host->jitter_max / 1000, (targets > 1) ? host->name : "", | ||
1488 | (float)host->jitter_min / 1000 | ||
1489 | ); | ||
1482 | } | 1490 | } |
1483 | if (mos_mode && host->pl<100) { | 1491 | if (mos_mode && host->pl<100) { |
1484 | printf("%smos=%0.1f;%0.1f;%0.1f;0;5 ", (targets > 1) ? host->name : "", (float)host->mos, (float)warn.mos, (float)crit.mos); | 1492 | printf("%smos=%0.1f;%0.1f;%0.1f;0;5 ", |
1493 | (targets > 1) ? host->name : "", | ||
1494 | (float)host->mos, | ||
1495 | (float)warn.mos, | ||
1496 | (float)crit.mos | ||
1497 | ); | ||
1485 | } | 1498 | } |
1486 | if (score_mode && host->pl<100) { | 1499 | if (score_mode && host->pl<100) { |
1487 | printf("%sscore=%u;%u;%u;0;100 ", (targets > 1) ? host->name : "", (int)host->score, (int)warn.score, (int)crit.score); | 1500 | printf("%sscore=%u;%u;%u;0;100 ", |
1501 | (targets > 1) ? host->name : "", | ||
1502 | (int)host->score, | ||
1503 | (int)warn.score, | ||
1504 | (int)crit.score | ||
1505 | ); | ||
1488 | } | 1506 | } |
1489 | host = host->next; | 1507 | host = host->next; |
1490 | } | 1508 | } |