Log(LogDebug, "CheckResultReader")
<< "Processed checkresult file for object '" << checkable->GetName() << "'";
+
+ /* Reschedule the next check. The side effect of this is that for as long
+ * as we receive check result files for a host/service we won't execute any
+ * active checks. */
+ checkable->SetNextCheck(Utility::GetTime() + checkable->GetCheckInterval());
}
cr->SetCommand(params->Get("check_command"));
checkable->ProcessCheckResult(cr);
+ /* Reschedule the next check. The side effect of this is that for as long
+ * as we receive passive results for a service we won't execute any
+ * active checks. */
+ checkable->SetNextCheck(Utility::GetTime() + checkable->GetCheckInterval());
+
return ApiActions::CreateResult(200, "Successfully processed check result for object '" + checkable->GetName() + "'.");
}
UpdateFlappingStatus(stateChange);
is_flapping = IsFlapping();
- /* update next check time for active and passive check results */
- if (!GetEnableActiveChecks() && GetEnablePassiveChecks()) {
- /* Reschedule the next passive check. The side effect of this is that for as long
- * as we receive passive results for a service we won't execute any
- * active checks. */
- SetNextCheck(Utility::GetTime() + GetCheckInterval());
- } else if (GetEnableActiveChecks()) {
- /* update next check time based on state changes and types */
- UpdateNextCheck();
- }
+ /* update next check time on possible state changes */
+ UpdateNextCheck();
olock.Unlock();
<< "Processing passive check result for host '" << arguments[0] << "'";
host->ProcessCheckResult(result);
+
+ /* Reschedule the next check. The side effect of this is that for as long
+ * as we receive passive results for a service we won't execute any
+ * active checks. */
+ host->SetNextCheck(Utility::GetTime() + host->GetCheckInterval());
}
void ExternalCommandProcessor::ProcessServiceCheckResult(double time, const std::vector<String>& arguments)
<< "Processing passive check result for service '" << arguments[1] << "'";
service->ProcessCheckResult(result);
+
+ /* Reschedule the next check. The side effect of this is that for as long
+ * as we receive passive results for a service we won't execute any
+ * active checks. */
+ service->SetNextCheck(Utility::GetTime() + service->GetCheckInterval());
}
void ExternalCommandProcessor::ScheduleHostCheck(double, const std::vector<String>& arguments)