mirror of https://github.com/Icinga/icinga2.git
Make sure the next check timestamp can't be in the past.
This commit is contained in:
parent
6698d09a72
commit
eb7d9e96f8
|
@ -266,6 +266,9 @@ void ExternalCommandProcessor::ScheduleHostCheck(double, const std::vector<Strin
|
|||
|
||||
Log(LogInformation, "icinga", "Rescheduling next check for host '" + arguments[0] + "'");
|
||||
|
||||
if (planned_check < Utility::GetTime())
|
||||
planned_check = Utility::GetTime();
|
||||
|
||||
{
|
||||
ObjectLock olock(hc);
|
||||
|
||||
|
@ -315,6 +318,9 @@ void ExternalCommandProcessor::ScheduleSvcCheck(double, const std::vector<String
|
|||
|
||||
Log(LogInformation, "icinga", "Rescheduling next check for service '" + arguments[1] + "'");
|
||||
|
||||
if (planned_check < Utility::GetTime())
|
||||
planned_check = Utility::GetTime();
|
||||
|
||||
{
|
||||
ObjectLock olock(service);
|
||||
|
||||
|
@ -453,6 +459,9 @@ void ExternalCommandProcessor::ScheduleHostSvcChecks(double, const std::vector<S
|
|||
|
||||
Host::Ptr host = Host::GetByName(arguments[0]);
|
||||
|
||||
if (planned_check < Utility::GetTime())
|
||||
planned_check = Utility::GetTime();
|
||||
|
||||
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
|
||||
if (planned_check > service->GetNextCheck()) {
|
||||
Log(LogInformation, "icinga", "Ignoring reschedule request for service '" +
|
||||
|
|
Loading…
Reference in New Issue