mirror of https://github.com/Icinga/icinga2.git
parent
e31d520f6b
commit
efafcecced
|
@ -18,4 +18,5 @@
|
|||
******************************************************************************/
|
||||
|
||||
%type NotificationComponent {
|
||||
%attribute %number "enable_ha"
|
||||
}
|
||||
|
|
|
@ -75,6 +75,9 @@ void NotificationComponent::NotificationTimerHandler(void)
|
|||
BOOST_FOREACH(const Notification::Ptr& notification, DynamicType::GetObjects<Notification>()) {
|
||||
Checkable::Ptr checkable = notification->GetCheckable();
|
||||
|
||||
if (checkable->IsPaused() && GetEnableHA())
|
||||
continue;
|
||||
|
||||
if (!IcingaApplication::GetInstance()->GetEnableNotifications() || !checkable->GetEnableNotifications())
|
||||
continue;
|
||||
|
||||
|
@ -128,5 +131,8 @@ void NotificationComponent::NotificationTimerHandler(void)
|
|||
void NotificationComponent::SendNotificationsHandler(const Checkable::Ptr& checkable, NotificationType type,
|
||||
const CheckResult::Ptr& cr, const String& author, const String& text)
|
||||
{
|
||||
if (checkable->IsPaused() && GetEnableHA())
|
||||
return;
|
||||
|
||||
checkable->SendNotifications(type, cr, author, text);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ namespace icinga
|
|||
|
||||
class NotificationComponent : DynamicObject
|
||||
{
|
||||
[config] bool enable_ha (EnableHA) {
|
||||
default {{{ return true; }}}
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue