summaryrefslogtreecommitdiffstats
path: root/plugins-root
diff options
context:
space:
mode:
authorDanijel Tasov <m@rbfh.de>2023-09-26 17:35:31 +0200
committerDanijel Tasov <m@rbfh.de>2023-09-26 17:35:31 +0200
commit42125d928f3792414290b00e184d8859a90fcd9e (patch)
tree917ea3d06d76b6ea0cf4c4cd7c32050737f3714e /plugins-root
parent4ed1d74295efe1c41f6a1489e2f187ece0d8452b (diff)
downloadmonitoring-plugins-42125d928f3792414290b00e184d8859a90fcd9e.tar.gz
Add some spaces to the output
needed if multiple modes are used at once Signed-off-by: Danijel Tasov <m@rbfh.de>
Diffstat (limited to 'plugins-root')
-rw-r--r--plugins-root/check_icmp.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index e2ce0590..a537c9c0 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -1379,10 +1379,10 @@ finish(int sig)
1379 else if((hosts_ok + hosts_warn) >= min_hosts_alive) status = STATE_WARNING; 1379 else if((hosts_ok + hosts_warn) >= min_hosts_alive) status = STATE_WARNING;
1380 } 1380 }
1381 printf("%s - ", status_string[status]); 1381 printf("%s - ", status_string[status]);
1382 1382
1383 host = list; 1383 host = list;
1384 while(host) { 1384 while(host) {
1385 1385
1386 if(debug) puts(""); 1386 if(debug) puts("");
1387 if(i) { 1387 if(i) {
1388 if(i < targets) printf(" :: "); 1388 if(i < targets) printf(" :: ");
@@ -1411,54 +1411,54 @@ finish(int sig)
1411 /* rta text output */ 1411 /* rta text output */
1412 if (rta_mode) { 1412 if (rta_mode) {
1413 if (status == STATE_OK) 1413 if (status == STATE_OK)
1414 printf("rta %0.3fms", host->rta / 1000); 1414 printf(" rta %0.3fms", host->rta / 1000);
1415 else if (status==STATE_WARNING && host->rta_status==status) 1415 else if (status==STATE_WARNING && host->rta_status==status)
1416 printf("rta %0.3fms > %0.3fms", (float)host->rta / 1000, (float)warn.rta/1000); 1416 printf(" rta %0.3fms > %0.3fms", (float)host->rta / 1000, (float)warn.rta/1000);
1417 else if (status==STATE_CRITICAL && host->rta_status==status) 1417 else if (status==STATE_CRITICAL && host->rta_status==status)
1418 printf("rta %0.3fms > %0.3fms", (float)host->rta / 1000, (float)crit.rta/1000); 1418 printf(" rta %0.3fms > %0.3fms", (float)host->rta / 1000, (float)crit.rta/1000);
1419 } 1419 }
1420 /* pl text output */ 1420 /* pl text output */
1421 if (pl_mode) { 1421 if (pl_mode) {
1422 if (status == STATE_OK) 1422 if (status == STATE_OK)
1423 printf("lost %u%%", host->pl); 1423 printf(" lost %u%%", host->pl);
1424 else if (status==STATE_WARNING && host->pl_status==status) 1424 else if (status==STATE_WARNING && host->pl_status==status)
1425 printf("lost %u%% > %u%%", host->pl, warn.pl); 1425 printf(" lost %u%% > %u%%", host->pl, warn.pl);
1426 else if (status==STATE_CRITICAL && host->pl_status==status) 1426 else if (status==STATE_CRITICAL && host->pl_status==status)
1427 printf("lost %u%% > %u%%", host->pl, crit.pl); 1427 printf(" lost %u%% > %u%%", host->pl, crit.pl);
1428 } 1428 }
1429 /* jitter text output */ 1429 /* jitter text output */
1430 if (jitter_mode) { 1430 if (jitter_mode) {
1431 if (status == STATE_OK) 1431 if (status == STATE_OK)
1432 printf("jitter %0.3fms", (float)host->jitter); 1432 printf(" jitter %0.3fms", (float)host->jitter);
1433 else if (status==STATE_WARNING && host->jitter_status==status) 1433 else if (status==STATE_WARNING && host->jitter_status==status)
1434 printf("jitter %0.3fms > %0.3fms", (float)host->jitter, warn.jitter); 1434 printf(" jitter %0.3fms > %0.3fms", (float)host->jitter, warn.jitter);
1435 else if (status==STATE_CRITICAL && host->jitter_status==status) 1435 else if (status==STATE_CRITICAL && host->jitter_status==status)
1436 printf("jitter %0.3fms > %0.3fms", (float)host->jitter, crit.jitter); 1436 printf(" jitter %0.3fms > %0.3fms", (float)host->jitter, crit.jitter);
1437 } 1437 }
1438 /* mos text output */ 1438 /* mos text output */
1439 if (mos_mode) { 1439 if (mos_mode) {
1440 if (status == STATE_OK) 1440 if (status == STATE_OK)
1441 printf("MOS %0.1f", (float)host->mos); 1441 printf(" MOS %0.1f", (float)host->mos);
1442 else if (status==STATE_WARNING && host->mos_status==status) 1442 else if (status==STATE_WARNING && host->mos_status==status)
1443 printf("MOS %0.1f < %0.1f", (float)host->mos, (float)warn.mos); 1443 printf(" MOS %0.1f < %0.1f", (float)host->mos, (float)warn.mos);
1444 else if (status==STATE_CRITICAL && host->mos_status==status) 1444 else if (status==STATE_CRITICAL && host->mos_status==status)
1445 printf("MOS %0.1f < %0.1f", (float)host->mos, (float)crit.mos); 1445 printf(" MOS %0.1f < %0.1f", (float)host->mos, (float)crit.mos);
1446 } 1446 }
1447 /* score text output */ 1447 /* score text output */
1448 if (score_mode) { 1448 if (score_mode) {
1449 if (status == STATE_OK) 1449 if (status == STATE_OK)
1450 printf("Score %u", (int)host->score); 1450 printf(" Score %u", (int)host->score);
1451 else if (status==STATE_WARNING && host->score_status==status ) 1451 else if (status==STATE_WARNING && host->score_status==status )
1452 printf("Score %u < %u", (int)host->score, (int)warn.score); 1452 printf(" Score %u < %u", (int)host->score, (int)warn.score);
1453 else if (status==STATE_CRITICAL && host->score_status==status ) 1453 else if (status==STATE_CRITICAL && host->score_status==status )
1454 printf("Score %u < %u", (int)host->score, (int)crit.score); 1454 printf(" Score %u < %u", (int)host->score, (int)crit.score);
1455 } 1455 }
1456 /* order statis text output */ 1456 /* order statis text output */
1457 if (order_mode) { 1457 if (order_mode) {
1458 if (status == STATE_OK) 1458 if (status == STATE_OK)
1459 printf("Packets in order"); 1459 printf(" Packets in order");
1460 else if (status==STATE_CRITICAL && host->order_status==status) 1460 else if (status==STATE_CRITICAL && host->order_status==status)
1461 printf("Packets out of order"); 1461 printf(" Packets out of order");
1462 } 1462 }
1463 } 1463 }
1464 host = host->next; 1464 host = host->next;