mirror of https://github.com/Icinga/icinga2.git
parent
2ea75203ce
commit
cd4ebf1bf2
|
@ -196,8 +196,11 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se
|
|||
|
||||
if (notification->GetNotificationStateFilter())
|
||||
notification_state_filter = notification->GetNotificationStateFilter();
|
||||
|
||||
Log(LogDebug, "compatutility", "notification_type_filter: " + Convert::ToString(notification_type_filter) + " notification_state_filter: " + Convert::ToString(notification_state_filter));
|
||||
}
|
||||
|
||||
|
||||
if (notification_interval == -1)
|
||||
notification_interval = 60;
|
||||
|
||||
|
@ -228,7 +231,7 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se
|
|||
else
|
||||
attr->Set("alias", host->GetDisplayName());
|
||||
|
||||
/* notification filters */
|
||||
/* notification state filters */
|
||||
if (notification_state_filter & (1<<StateWarning) ||
|
||||
notification_state_filter & (1<<StateCritical)) {
|
||||
attr->Set("notify_on_down", 1);
|
||||
|
@ -244,7 +247,7 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se
|
|||
custom = service->GetCustom();
|
||||
macros = service->GetMacros();
|
||||
|
||||
/* notification filters */
|
||||
/* notification state filters */
|
||||
if (notification_state_filter & (1<<StateWarning)) {
|
||||
attr->Set("notify_on_warning", 1);
|
||||
notification_options.push_back("w");
|
||||
|
@ -306,7 +309,6 @@ Dictionary::Ptr CompatUtility::GetServiceConfigAttributes(const Service::Ptr& se
|
|||
}
|
||||
|
||||
/* custom attr */
|
||||
/* TODO resolve all static macros */
|
||||
if (custom) {
|
||||
attr->Set("notes", custom->Get("notes"));
|
||||
attr->Set("notes_url", custom->Get("notes_url"));
|
||||
|
|
|
@ -74,11 +74,11 @@ Dictionary::Ptr HostDbObject::GetConfigFields(void) const
|
|||
|
||||
fields->Set("first_notification_delay", Empty);
|
||||
fields->Set("notification_interval", attrs->Get("notification_interval"));
|
||||
fields->Set("notify_on_down", Empty);
|
||||
fields->Set("notify_on_unreachable", Empty);
|
||||
fields->Set("notify_on_recovery", Empty);
|
||||
fields->Set("notify_on_flapping", Empty);
|
||||
fields->Set("notify_on_downtime", Empty);
|
||||
fields->Set("notify_on_down", attrs->Get("notify_on_down"));
|
||||
fields->Set("notify_on_unreachable", attrs->Get("notify_on_unreachable"));
|
||||
fields->Set("notify_on_recovery", attrs->Get("notify_on_recovery"));
|
||||
fields->Set("notify_on_flapping", attrs->Get("notify_on_flapping"));
|
||||
fields->Set("notify_on_downtime", attrs->Get("notify_on_downtime"));
|
||||
|
||||
fields->Set("stalk_on_up", Empty);
|
||||
fields->Set("stalk_on_down", Empty);
|
||||
|
|
|
@ -66,12 +66,12 @@ Dictionary::Ptr ServiceDbObject::GetConfigFields(void) const
|
|||
fields->Set("max_check_attempts", attrs->Get("max_check_attempts"));
|
||||
fields->Set("first_notification_delay", Empty);
|
||||
fields->Set("notification_interval", attrs->Get("notification_interval"));
|
||||
fields->Set("notify_on_warning", Empty);
|
||||
fields->Set("notify_on_unknown", Empty);
|
||||
fields->Set("notify_on_critical", Empty);
|
||||
fields->Set("notify_on_recovery", Empty);
|
||||
fields->Set("notify_on_flapping", Empty);
|
||||
fields->Set("notify_on_downtime", Empty);
|
||||
fields->Set("notify_on_warning", attrs->Get("notify_on_warning"));
|
||||
fields->Set("notify_on_unknown", attrs->Get("notify_on_unknown"));
|
||||
fields->Set("notify_on_critical", attrs->Get("notify_on_critical"));
|
||||
fields->Set("notify_on_recovery", attrs->Get("notify_on_recovery"));
|
||||
fields->Set("notify_on_flapping", attrs->Get("notify_on_flapping"));
|
||||
fields->Set("notify_on_downtime", attrs->Get("notify_on_downtime"));
|
||||
fields->Set("stalk_on_ok", 0);
|
||||
fields->Set("stalk_on_warning", 0);
|
||||
fields->Set("stalk_on_unknown", 0);
|
||||
|
|
Loading…
Reference in New Issue