cr->SetCheckSource(HttpUtility::GetLastParameter(params, "check_source"));
cr->SetPerformanceData(params->Get("performance_data"));
cr->SetCommand(params->Get("check_command"));
+
+ /* Mark this check result as passive. */
+ cr->SetActive(false);
+
checkable->ProcessCheckResult(cr);
/* Reschedule the next check. The side effect of this is that for as long
SetStateType(StateTypeHard);
} else if (old_stateType == StateTypeSoft && !StateIsOK(checkableType, old_state)) {
SetStateType(StateTypeSoft);
- attempt = old_attempt + 1; //NOT-OK -> NOT-OK counter
+ attempt = old_attempt + 1; // NOT-OK -> NOT-OK counter
} else if (StateIsOK(checkableType, old_state)) {
SetStateType(StateTypeSoft);
- attempt = 1; //OK -> NOT-OK transition, reset the counter
+ attempt = 1; // OK -> NOT-OK transition, reset the counter
+
+ /* If there was a OK -> NOT-OK state change for actively scheduled checks,
+ * update the next check time using the retry_interval.
+ * Important: Add the cluster message origin.
+ */
+ if (cr->GetActive())
+ SetNextCheck(Utility::GetTime() + GetRetryInterval(), false, origin);
} else {
attempt = old_attempt;
}
result->SetScheduleEnd(time);
result->SetExecutionStart(time);
result->SetExecutionEnd(time);
+
+ /* Mark this check result as passive. */
result->SetActive(false);
Log(LogNotice, "ExternalCommandProcessor")
result->SetScheduleEnd(time);
result->SetExecutionStart(time);
result->SetExecutionEnd(time);
+
+ /* Mark this check result as passive. */
result->SetActive(false);
Log(LogNotice, "ExternalCommandProcessor")