Thanks Gerald, that works! Regards, Samuel
On 08. 11. 16 14:02, Gerald Vogt wrote:
On 08/11/2016 13:52, Bancal Samuel wrote:basically I set something like this (here I set 2 and 5 minutes ... to test faster ;) ) : apply Notification "mail_two_levels" to Service { import "mail-service-notification" if ( service.state == "CRITICAL" ) { interval = 2m } else { interval = 5m } user_groups = host.vars.notification.mail_two_levels.groups users = host.vars.notification.mail_two_levels.users assign where host.vars.notification.mail_two_levels }Well, that doesn't really makes sense to me. The if statement in configuration is on configuration objects. There are no runtime values during configuration. Thus the "service.state == "CRITICAL"" is never true. You should set up two notification objects: one for state CRITICAL with interval 2m and one for state WARNING with interval 5m: apply Notification "notif-critical" to Service { ... states = [ "Critical" ] interval = 2m ... } Of course, you should the remaining states "Unknown" and "OK" to one of those to get these notifications as well. -Gerald _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
-- Samuel Bancal ENAC-IT EPFL _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
