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