mirror of https://github.com/Icinga/icinga2.git
Make sure that the scheduled start time for downtimes isn't ignored
fixes #6959
This commit is contained in:
parent
a026d47454
commit
c86b17132c
|
@ -201,6 +201,14 @@ void Checkable::TriggerDowntime(const String& id)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double now = Utility::GetTime();
|
||||||
|
|
||||||
|
if (now < downtime->GetStartTime() && now > downtime->GetEndTime()) {
|
||||||
|
Log(LogDebug, "Checkable")
|
||||||
|
<< "Not triggering downtime with ID '" << downtime->GetLegacyId() << "': current time is outside downtime window.";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Log(LogNotice, "Checkable")
|
Log(LogNotice, "Checkable")
|
||||||
<< "Triggering downtime with ID '" << downtime->GetLegacyId() << "'.";
|
<< "Triggering downtime with ID '" << downtime->GetLegacyId() << "'.";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue