mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 07:04:37 +02:00
Don't send notifications for services that are unreachable, in a downtime or acknowledged.
This commit is contained in:
parent
18ed997696
commit
c6e8013238
@ -353,6 +353,7 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr)
|
|||||||
* state/state_type attributes. */
|
* state/state_type attributes. */
|
||||||
DynamicObject::FlushTx();
|
DynamicObject::FlushTx();
|
||||||
|
|
||||||
|
if (IsReachable() && !IsInDowntime() && !IsAcknowledged())
|
||||||
RequestNotifications(NotificationStateChange);
|
RequestNotifications(NotificationStateChange);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -190,6 +190,11 @@ void Service::SetAcknowledgement(AcknowledgementType acknowledgement)
|
|||||||
Set("acknowledgement", static_cast<long>(acknowledgement));
|
Set("acknowledgement", static_cast<long>(acknowledgement));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Service::IsAcknowledged(void)
|
||||||
|
{
|
||||||
|
return GetAcknowledgement() != AcknowledgementNone;
|
||||||
|
}
|
||||||
|
|
||||||
double Service::GetAcknowledgementExpiry(void) const
|
double Service::GetAcknowledgementExpiry(void) const
|
||||||
{
|
{
|
||||||
Value value = Get("acknowledgement_expiry");
|
Value value = Get("acknowledgement_expiry");
|
||||||
|
@ -208,6 +208,7 @@ public:
|
|||||||
static void ValidateDowntimeCache(void);
|
static void ValidateDowntimeCache(void);
|
||||||
|
|
||||||
bool IsInDowntime(void) const;
|
bool IsInDowntime(void) const;
|
||||||
|
bool IsAcknowledged(void);
|
||||||
|
|
||||||
/* Comments */
|
/* Comments */
|
||||||
static int GetNextCommentID(void);
|
static int GetNextCommentID(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user