parent_host_name = "internet"
parent_service_name = "ping4"
- state_filter = [ OK, Warning ]
+ states = [ OK, Warning ]
disable_checks = true
}
disable_checks |**Optional.** Whether to disable checks when this dependency fails. Defaults to false.
disable_notifications|**Optional.** Whether to disable notifications when this dependency fails. Defaults to true.
period |**Optional.** Time period during which this dependency is enabled.
- state_filter |**Optional.** A list of state filters when this dependency should be OK. Defaults to [ OK, Warning ] for services and [ Up ] for hosts.
+ states |**Optional.** A list of state filters when this dependency should be OK. Defaults to [ OK, Warning ] for services and [ Up ] for hosts.
Available state filters:
%attribute %name(TimePeriod) "period",
- %attribute %array "state_filter" {
+ %attribute %array "states" {
%attribute %number "*"
},
%attribute %number "disable_checks",
void Notification::ValidateFilters(const String& location, const Dictionary::Ptr& attrs)
{
- int sfilter = FilterArrayToInt(attrs->Get("notification_state_filter"), 0);
+ int sfilter = FilterArrayToInt(attrs->Get("states"), 0);
if (!attrs->Contains("service_name") && (sfilter & ~(StateFilterUp | StateFilterDown)) != 0) {
ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
location + ": State filter is invalid.");
}
- int tfilter = FilterArrayToInt(attrs->Get("notification_type_filter"), 0);
+ int tfilter = FilterArrayToInt(attrs->Get("types"), 0);
if ((tfilter & ~(1 << NotificationDowntimeStart | 1 << NotificationDowntimeEnd | 1 << NotificationDowntimeRemoved |
1 << NotificationCustom | 1 << NotificationAcknowledgement | 1 << NotificationProblem | 1 << NotificationRecovery |
void User::ValidateFilters(const String& location, const Dictionary::Ptr& attrs)
{
- int sfilter = FilterArrayToInt(attrs->Get("notification_state_filter"), 0);
+ int sfilter = FilterArrayToInt(attrs->Get("states"), 0);
if ((sfilter & ~(StateFilterUp | StateFilterDown | StateFilterOK | StateFilterWarning | StateFilterCritical | StateFilterUnknown)) != 0) {
ConfigCompilerContext::GetInstance()->AddMessage(true, "Validation failed for " +
location + ": State filter is invalid.");
}
- int tfilter = FilterArrayToInt(attrs->Get("notification_type_filter"), 0);
+ int tfilter = FilterArrayToInt(attrs->Get("types"), 0);
if ((tfilter & ~(1 << NotificationDowntimeStart | 1 << NotificationDowntimeEnd | 1 << NotificationDowntimeRemoved |
1 << NotificationCustom | 1 << NotificationAcknowledgement | 1 << NotificationProblem | 1 << NotificationRecovery |