mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 05:34:48 +02:00
Fix: First HARD state does not change retry_interval to check_interval
refs #11825
This commit is contained in:
parent
3f1a9f150b
commit
d49b63d2ab
@ -329,8 +329,14 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
/* If there was a OK -> NOT-OK state change for actively scheduled checks,
|
/* If there was a OK -> NOT-OK state change for actively scheduled checks,
|
||||||
* update the next check time using the retry_interval.
|
* update the next check time using the retry_interval.
|
||||||
* Important: Add the cluster message origin. */
|
* Important: Add the cluster message origin. */
|
||||||
if (GetStateType() == StateTypeSoft)
|
if (GetStateType() == StateTypeSoft) {
|
||||||
UpdateNextCheck(origin);
|
UpdateNextCheck(origin);
|
||||||
|
} else if (hardChange) {
|
||||||
|
/* A hard state change must enforce the check interval again.
|
||||||
|
* UpdateNextCheck() will use the scheduling offset which generates
|
||||||
|
* an incorrect check time from the previous retry interval. */
|
||||||
|
SetNextCheck(Utility::GetTime() + GetCheckInterval(), false, origin);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Reschedule the next check for passive check results. The side effect of
|
/* Reschedule the next check for passive check results. The side effect of
|
||||||
* this is that for as long as we receive passive results for a service we
|
* this is that for as long as we receive passive results for a service we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user