Icinga2: states filter not working as per documentation

Created on 26 May 2017  路  2Comments  路  Source: Icinga/icinga2

Expected Behavior

Should be able to specify notification state filters as per the documentation: https://github.com/Icinga/icinga2/blob/master/etc/icinga2/conf.d/templates.conf#L71

eg states = [ OK, Warning, Critical, Unknown ]

Current Behavior

Produces an error on reload:

Error: Validation failed for object 'my-host!mail-host-notification-all' of type 'Notification'; Attribute 'states': State filter is invalid.
Location: in /etc/icinga2/conf.d/templates.conf: 83:3-83:45
/etc/icinga2/conf.d/templates.conf(81):   command = "mail-service-notification"
/etc/icinga2/conf.d/templates.conf(82):
/etc/icinga2/conf.d/templates.conf(83):   states = [ OK, Warning, Critical, Unknown ]

Your Environment

Icinga version: r2.6.3-1
Ubuntu 16.04

no-issue

Most helpful comment

The states you've specified are not valid for a host. Note how the example you've linked is a Notification object for a service. The valid states for hosts are _Up_ and _Down_.

All 2 comments

The states you've specified are not valid for a host. Note how the example you've linked is a Notification object for a service. The valid states for hosts are _Up_ and _Down_.

Ahhh, yeah had the config all skewiff ... Thanks for explaining 馃憤

Was this page helpful?
0 / 5 - 0 ratings