mirror of https://github.com/Icinga/icinga2.git
Merge pull request #7050 from Icinga/feature/previous-state-change
Implement previous_state_change
This commit is contained in:
commit
02db12ae02
|
@ -256,6 +256,9 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||
else
|
||||
stateChange = (Host::CalculateState(old_state) != Host::CalculateState(new_state));
|
||||
|
||||
/* Store the current last state change for the next iteration. */
|
||||
SetPreviousStateChange(GetLastStateChange());
|
||||
|
||||
if (stateChange) {
|
||||
SetLastStateChange(now);
|
||||
|
||||
|
|
|
@ -120,6 +120,9 @@ abstract class Checkable : CustomVarObject
|
|||
};
|
||||
[state] Timestamp last_state_unreachable;
|
||||
|
||||
[state] Timestamp previous_state_change {
|
||||
default {{{ return Application::GetStartTime(); }}}
|
||||
};
|
||||
[no_storage] int severity {
|
||||
get;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue