mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
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
|
else
|
||||||
stateChange = (Host::CalculateState(old_state) != Host::CalculateState(new_state));
|
stateChange = (Host::CalculateState(old_state) != Host::CalculateState(new_state));
|
||||||
|
|
||||||
|
/* Store the current last state change for the next iteration. */
|
||||||
|
SetPreviousStateChange(GetLastStateChange());
|
||||||
|
|
||||||
if (stateChange) {
|
if (stateChange) {
|
||||||
SetLastStateChange(now);
|
SetLastStateChange(now);
|
||||||
|
|
||||||
|
@ -120,6 +120,9 @@ abstract class Checkable : CustomVarObject
|
|||||||
};
|
};
|
||||||
[state] Timestamp last_state_unreachable;
|
[state] Timestamp last_state_unreachable;
|
||||||
|
|
||||||
|
[state] Timestamp previous_state_change {
|
||||||
|
default {{{ return Application::GetStartTime(); }}}
|
||||||
|
};
|
||||||
[no_storage] int severity {
|
[no_storage] int severity {
|
||||||
get;
|
get;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user