In the templates.conf file I had to remove the downtime start and end options 
from “types”

template Notification "mail-service-notification" {
  command = "mail-service-notification"

  states = [ OK, Warning, Critical, Unknown ]
  types = [ Problem, Acknowledgement, Recovery, Custom,
            FlappingStart, FlappingEnd ]

  period = "24x7"

From: icinga-users [mailto:[email protected]] On Behalf Of 
Andreas Lehr
Sent: Thursday, September 11, 2014 4:27 AM
To: [email protected]
Subject: [icinga-users] ScheduledDowntime Notifications sent without SLA var 
set?

Hi there,

i have a question regarding scheduled downtimes in icinga2.
With a standard default installation in Debian via the debmon packages the 
notifications.conf looks like this:

/**
 * The example notification apply rules.
 *
 * Only applied if host/service objects have
 * the custom attribute `sla` set to `24x7`.
 */
apply Notification "mail-icingaadmin" to Host {
  import "mail-host-notification"
  user_groups = [ "icingaadmins" ]
  assign where host.vars.sla == "24x7"
}
apply Notification "mail-icingaadmin" to Service {
  import "mail-service-notification"
  user_groups = [ "icingaadmins" ]
  assign where service.vars.sla == "24x7"
}


The default downtime.conf:

/**
 * The example downtime apply rule.
 */

apply ScheduledDowntime "backup-downtime" to Service {
  import "backup-downtime"

  assign where host.name<http://host.name> == "localhost" && 
service.name<http://service.name> == "load"
}


As far as i understood, there should be no DowntimeStart/DowntimeEnd 
notification with this configuration due to lack of vars.sla = "24x7" in the 
downtime.conf.
But unfortunately i get notifications for the Begin and End of downtime.
What am i missing here?
is it because the default load.conf has vars.sla = "24x7" configured?

default load.conf:

object Service "load" {
  import "generic-service"

  host_name = "localhost"
  check_command = "load"
  vars.sla = "24x7"
}


Thanks guys!


--


Andreas Lehr

[email protected]<mailto:[email protected]>

twitter.com/shakalandy<http://twitter.com/shakalandy>

http://andreas-lehr.com/blog


_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to