mirror of https://github.com/Icinga/icinga2.git
Add Checkable#problem and #handled
This commit is contained in:
parent
d33cfdf3c0
commit
896d447e11
|
@ -144,6 +144,16 @@ bool Checkable::GetReachable() const
|
|||
return IsReachable();
|
||||
}
|
||||
|
||||
bool Checkable::GetProblem() const
|
||||
{
|
||||
return !IsStateOK(GetStateRaw());
|
||||
}
|
||||
|
||||
bool Checkable::GetHandled() const
|
||||
{
|
||||
return GetProblem() && (IsInDowntime() || IsAcknowledged());
|
||||
}
|
||||
|
||||
void Checkable::NotifyFixedDowntimeStart(const Downtime::Ptr& downtime)
|
||||
{
|
||||
if (!downtime->GetFixed())
|
||||
|
|
|
@ -86,6 +86,8 @@ public:
|
|||
|
||||
int GetSeverity() const override;
|
||||
bool GetReachable() const override;
|
||||
bool GetProblem() const override;
|
||||
bool GetHandled() const override;
|
||||
|
||||
/* Checks */
|
||||
intrusive_ptr<CheckCommand> GetCheckCommand() const;
|
||||
|
|
|
@ -126,6 +126,12 @@ abstract class Checkable : CustomVarObject
|
|||
[no_storage] bool reachable {
|
||||
get;
|
||||
};
|
||||
[no_storage] bool problem {
|
||||
get;
|
||||
};
|
||||
[no_storage] bool handled {
|
||||
get;
|
||||
};
|
||||
|
||||
[state] bool force_next_check;
|
||||
[state] int acknowledgement (AcknowledgementRaw) {
|
||||
|
|
Loading…
Reference in New Issue