/**
 * This template is essentially the same as the default one but with a customised notification_interval
 */
template Notification "mail-notification" {
  notification_command = "mail-service-notification",

  notification_state_filter = (StateFilterWarning |
                               StateFilterCritical |
                               StateFilterUnknown),
  notification_type_filter = (NotificationFilterProblem |
                              NotificationFilterAcknowledgement |
                              NotificationFilterRecovery |
                              NotificationFilterCustom |
                              NotificationFilterFlappingStart |
                              NotificationFilterFlappingEnd |
                              NotificationFilterDowntimeStart |
                              NotificationFilterDowntimeEnd |
                              NotificationFilterDowntimeRemoved),

  notification_period = "24x7",
  notification_interval = 10
}

/**
 * 1:1 copy of the default command
 */
object NotificationCommand "mail-service-notification" {
  import "plugin-notification-command",

  command = [ (SysconfDir + "/icinga2/scripts/mail-notification.sh") ],

  export_macros = [
    "NOTIFICATIONTYPE",
    "SERVICEDESC",
    "HOSTALIAS",
    "HOSTADDRESS",
    "SERVICESTATE",
    "LONGDATETIME",
    "SERVICEOUTPUT",
    "NOTIFICATIONAUTHORNAME",
    "NOTIFICATIONCOMMENT",
    "HOSTDISPLAYNAME",
    "SERVICEDISPLAYNAME",
    "USEREMAIL"
  ]
}
