%attribute number "check_interval",
%attribute number "retry_interval",
+ %attribute number "enable_notifications",
%attribute number "enable_active_checks",
%attribute number "enable_passive_checks",
%attribute number "enable_event_handler",
bool Service::GetEnableNotifications(void) const
{
- return GetEnableNotificationsRaw();
+ if (!GetOverrideEnableNotifications().IsEmpty())
+ return GetOverrideEnableNotifications();
+ else
+ return GetEnableNotifications();
}
void Service::SetEnableNotifications(bool enabled, const String& authority)
{
- SetEnableNotificationsRaw(enabled);
+ SetOverrideEnableActiveChecks(enabled);
OnEnableNotificationsChanged(GetSelf(), enabled, authority);
}
{
int attrs = 0;
+ if (!GetOverrideEnableNotifications().IsEmpty())
+ attrs |= ModAttrNotificationsEnabled;
+
if (!GetOverrideEnableActiveChecks().IsEmpty())
attrs |= ModAttrActiveChecksEnabled;
void Service::SetModifiedAttributes(int flags)
{
+ if ((flags & ModAttrNotificationsEnabled) == 0)
+ SetOverrideEnableNotifications(Empty);
+
if ((flags & ModAttrActiveChecksEnabled) == 0)
SetOverrideEnableActiveChecks(Empty);
[config] bool enable_event_handler (EnableEventHandlerRaw) {
default {{{ return true; }}}
};
+ [config] bool enable_notifications (EnableNotificationsRaw) {
+ default {{{ return true; }}}
+ };
[state] double next_check (NextCheckRaw);
[state] int check_attempt {
[state] Dictionary::Ptr downtimes {
default {{{ return make_shared<Dictionary>(); }}}
};
- [state] bool enable_notifications (EnableNotificationsRaw) {
- default {{{ return true; }}}
- };
[state] bool force_next_notification (ForceNextNotificationRaw);
[state] int flapping_positive;
[state] int flapping_negative;
[state] bool enable_perfdata {
default {{{ return true; }}}
};
+ [state] Value override_enable_notifications;
[state] Value override_enable_active_checks;
[state] Value override_enable_passive_checks;
[state] Value override_check_interval;