mirror of https://github.com/Icinga/icinga2.git
Downtime#Start(): trigger flexible downtimes not earlier than fixed ones
the last state change could be a long time ago. If it's longer than the new downtime's duration, the downtime expires immediately. trigger time + duration < now
This commit is contained in:
parent
0ac1cd1ecb
commit
58b788cd51
|
@ -133,7 +133,8 @@ void Downtime::Start(bool runtimeCreated)
|
|||
Log(LogNotice, "Downtime")
|
||||
<< "Checkable '" << checkable->GetName() << "' already in a NOT-OK state."
|
||||
<< " Triggering downtime now.";
|
||||
TriggerDowntime(checkable->GetLastStateChange());
|
||||
|
||||
TriggerDowntime(std::fmax(std::fmax(GetStartTime(), GetEntryTime()), checkable->GetLastStateChange()));
|
||||
}
|
||||
|
||||
if (GetFixed() && CanBeTriggered()) {
|
||||
|
|
Loading…
Reference in New Issue