mirror of https://github.com/Icinga/icinga2.git
Implemented notification_interval attribute for hosts.
This commit is contained in:
parent
39b0806778
commit
6bf086dc91
|
@ -67,6 +67,9 @@ void NotificationComponent::NotificationTimerHandler(void)
|
|||
if (service->GetState() == StateOK)
|
||||
continue;
|
||||
|
||||
if (service->GetNotificationInterval() <= 0)
|
||||
continue;
|
||||
|
||||
if (service->GetLastNotification() > now - service->GetNotificationInterval())
|
||||
continue;
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ type Host {
|
|||
%attribute number "max_check_attempts",
|
||||
%attribute number "check_interval",
|
||||
%attribute number "retry_interval",
|
||||
%attribute number "notification_interval",
|
||||
%attribute dictionary "macros" {
|
||||
%attribute string "*"
|
||||
},
|
||||
|
|
|
@ -173,6 +173,10 @@ static void CopyServiceAttributes(TDict serviceDesc, const ConfigItemBuilder::Pt
|
|||
if (!short_name.IsEmpty())
|
||||
builder->AddExpression("short_name", OperatorSet, short_name);
|
||||
|
||||
Value notification_interval = serviceDesc->Get("notification_interval");
|
||||
if (!notification_interval.IsEmpty())
|
||||
builder->AddExpression("notification_interval", OperatorSet, notification_interval);
|
||||
|
||||
if (copyServiceAttrs) {
|
||||
Value servicedependencies = serviceDesc->Get("servicedependencies");
|
||||
if (!servicedependencies.IsEmpty())
|
||||
|
|
Loading…
Reference in New Issue