mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Clean up reachability calculation.
This commit is contained in:
parent
16e8d131fb
commit
9e7ba72eb4
@ -144,9 +144,16 @@ bool Service::IsReachable(void) const
|
|||||||
if (!service.HasLastCheckResult())
|
if (!service.HasLastCheckResult())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (service.GetStateType() == StateTypeHard && service.GetState() != StateOK &&
|
/* ignore soft states */
|
||||||
service.GetState() != StateWarning)
|
if (service.GetStateType() == StateTypeSoft)
|
||||||
return false;
|
continue;
|
||||||
|
|
||||||
|
/* ignore services states OK and Warning */
|
||||||
|
if (service.GetState() == StateOK ||
|
||||||
|
service.GetState() == StateWarning)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user