mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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;
|
||||
}
|
||||
|
||||
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")
|
||||
<< "Triggering downtime with ID '" << downtime->GetLegacyId() << "'.";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user