mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +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,7 +353,8 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr)
|
||||
* state/state_type attributes. */
|
||||
DynamicObject::FlushTx();
|
||||
|
||||
RequestNotifications(NotificationStateChange);
|
||||
if (IsReachable() && !IsInDowntime() && !IsAcknowledged())
|
||||
RequestNotifications(NotificationStateChange);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,6 +190,11 @@ void Service::SetAcknowledgement(AcknowledgementType acknowledgement)
|
||||
Set("acknowledgement", static_cast<long>(acknowledgement));
|
||||
}
|
||||
|
||||
bool Service::IsAcknowledged(void)
|
||||
{
|
||||
return GetAcknowledgement() != AcknowledgementNone;
|
||||
}
|
||||
|
||||
double Service::GetAcknowledgementExpiry(void) const
|
||||
{
|
||||
Value value = Get("acknowledgement_expiry");
|
||||
|
@ -208,6 +208,7 @@ public:
|
||||
static void ValidateDowntimeCache(void);
|
||||
|
||||
bool IsInDowntime(void) const;
|
||||
bool IsAcknowledged(void);
|
||||
|
||||
/* Comments */
|
||||
static int GetNextCommentID(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user