diff options
Diffstat (limited to 'plugins-root')
-rw-r--r-- | plugins-root/check_icmp.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 39ca302..5a9485d 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c | |||
@@ -1354,7 +1354,6 @@ finish(int sig) | |||
1354 | pl_mode = true; | 1354 | pl_mode = true; |
1355 | } | 1355 | } |
1356 | 1356 | ||
1357 | #define THIS_STATUS_WARNING this_status = (this_status <= STATE_WARNING ? STATE_WARNING : this_status) | ||
1358 | /* Check which mode is on and do the warn / Crit stuff */ | 1357 | /* Check which mode is on and do the warn / Crit stuff */ |
1359 | if (rta_mode) { | 1358 | if (rta_mode) { |
1360 | if(rta >= crit.rta) { | 1359 | if(rta >= crit.rta) { |
@@ -1362,7 +1361,7 @@ finish(int sig) | |||
1362 | status = STATE_CRITICAL; | 1361 | status = STATE_CRITICAL; |
1363 | host->rta_status=STATE_CRITICAL; | 1362 | host->rta_status=STATE_CRITICAL; |
1364 | } else if(status!=STATE_CRITICAL && (rta >= warn.rta)) { | 1363 | } else if(status!=STATE_CRITICAL && (rta >= warn.rta)) { |
1365 | THIS_STATUS_WARNING; | 1364 | this_status = (this_status <= STATE_WARNING ? STATE_WARNING : this_status) |
1366 | status = STATE_WARNING; | 1365 | status = STATE_WARNING; |
1367 | host->rta_status=STATE_WARNING; | 1366 | host->rta_status=STATE_WARNING; |
1368 | } | 1367 | } |
@@ -1374,7 +1373,7 @@ finish(int sig) | |||
1374 | status = STATE_CRITICAL; | 1373 | status = STATE_CRITICAL; |
1375 | host->pl_status=STATE_CRITICAL; | 1374 | host->pl_status=STATE_CRITICAL; |
1376 | } else if(status!=STATE_CRITICAL && (pl >= warn.pl)) { | 1375 | } else if(status!=STATE_CRITICAL && (pl >= warn.pl)) { |
1377 | THIS_STATUS_WARNING; | 1376 | this_status = (this_status <= STATE_WARNING ? STATE_WARNING : this_status) |
1378 | status = STATE_WARNING; | 1377 | status = STATE_WARNING; |
1379 | host->pl_status=STATE_WARNING; | 1378 | host->pl_status=STATE_WARNING; |
1380 | } | 1379 | } |
@@ -1386,7 +1385,7 @@ finish(int sig) | |||
1386 | status = STATE_CRITICAL; | 1385 | status = STATE_CRITICAL; |
1387 | host->jitter_status=STATE_CRITICAL; | 1386 | host->jitter_status=STATE_CRITICAL; |
1388 | } else if(status!=STATE_CRITICAL && (host->jitter >= warn.jitter)) { | 1387 | } else if(status!=STATE_CRITICAL && (host->jitter >= warn.jitter)) { |
1389 | THIS_STATUS_WARNING; | 1388 | this_status = (this_status <= STATE_WARNING ? STATE_WARNING : this_status) |
1390 | status = STATE_WARNING; | 1389 | status = STATE_WARNING; |
1391 | host->jitter_status=STATE_WARNING; | 1390 | host->jitter_status=STATE_WARNING; |
1392 | } | 1391 | } |
@@ -1398,7 +1397,7 @@ finish(int sig) | |||
1398 | status = STATE_CRITICAL; | 1397 | status = STATE_CRITICAL; |
1399 | host->mos_status=STATE_CRITICAL; | 1398 | host->mos_status=STATE_CRITICAL; |
1400 | } else if(status!=STATE_CRITICAL && (host->mos <= warn.mos)) { | 1399 | } else if(status!=STATE_CRITICAL && (host->mos <= warn.mos)) { |
1401 | THIS_STATUS_WARNING; | 1400 | this_status = (this_status <= STATE_WARNING ? STATE_WARNING : this_status) |
1402 | status = STATE_WARNING; | 1401 | status = STATE_WARNING; |
1403 | host->mos_status=STATE_WARNING; | 1402 | host->mos_status=STATE_WARNING; |
1404 | } | 1403 | } |
@@ -1410,7 +1409,7 @@ finish(int sig) | |||
1410 | status = STATE_CRITICAL; | 1409 | status = STATE_CRITICAL; |
1411 | host->score_status=STATE_CRITICAL; | 1410 | host->score_status=STATE_CRITICAL; |
1412 | } else if(status!=STATE_CRITICAL && (host->score <= warn.score)) { | 1411 | } else if(status!=STATE_CRITICAL && (host->score <= warn.score)) { |
1413 | THIS_STATUS_WARNING; | 1412 | this_status = (this_status <= STATE_WARNING ? STATE_WARNING : this_status) |
1414 | status = STATE_WARNING; | 1413 | status = STATE_WARNING; |
1415 | host->score_status=STATE_WARNING; | 1414 | host->score_status=STATE_WARNING; |
1416 | } | 1415 | } |