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;
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);
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");
}
/* custom attr */
- /* TODO resolve all static macros */
if (custom) {
attr->Set("notes", custom->Get("notes"));
attr->Set("notes_url", custom->Get("notes_url"));
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);
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);