Skip to content

Commit

Permalink
Clarify UNKNOWN -> UNKNOWN state changes
Browse files Browse the repository at this point in the history
refs #7807
  • Loading branch information
Al2Klimov committed Mar 22, 2021
1 parent 8d696ce commit 7cd1dd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/icinga/checkable-check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,13 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
if (hardChange || (is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state)))) {
OnStateChange(this, cr, StateTypeHard, origin);
Log(LogNotice, "Checkable")
<< "State Change: Checkable '" << GetName() << "' hard state change from " << old_state_str << " to " << new_state_str << " detected." << (is_volatile ? " Checkable is volatile." : "");
<< "State Change: Checkable '" << GetName() << "' hard state change from " << old_state_str << (old_cr ? "" : " (pending)") << " to " << new_state_str << " detected." << (is_volatile ? " Checkable is volatile." : "");
}
/* Whether a state change happened or the state type is SOFT (must be logged too). */
else if (stateChange || GetStateType() == StateTypeSoft) {
OnStateChange(this, cr, StateTypeSoft, origin);
Log(LogNotice, "Checkable")
<< "State Change: Checkable '" << GetName() << "' soft state change from " << old_state_str << " to " << new_state_str << " detected.";
<< "State Change: Checkable '" << GetName() << "' soft state change from " << old_state_str << (old_cr ? "" : " (pending)") << " to " << new_state_str << " detected.";
}

if (GetStateType() == StateTypeSoft || hardChange || recovery ||
Expand Down

0 comments on commit 7cd1dd8

Please sign in to comment.