mirror of https://github.com/Icinga/icinga2.git
Fix invalid testing configuration
This commit is contained in:
parent
862f61d93b
commit
a6a13ab86c
|
@ -1,3 +1,44 @@
|
|||
/**
|
||||
* This template is essentially the same as the default one but with a customised notification_interval
|
||||
*/
|
||||
template Notification "mail-notification" {
|
||||
notification_interval = 10
|
||||
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",
|
||||
notifications_interval = 10
|
||||
}
|
||||
|
||||
/**
|
||||
* 1:1 copy of the default command
|
||||
*/
|
||||
object NotificationCommand "mail-service-notification" inherits "plugin-notification-command" {
|
||||
command = [ (IcingaSysconfDir + "/icinga2/scripts/mail-notification.sh") ],
|
||||
|
||||
export_macros = [
|
||||
"NOTIFICATIONTYPE",
|
||||
"SERVICEDESC",
|
||||
"HOSTALIAS",
|
||||
"HOSTADDRESS",
|
||||
"SERVICESTATE",
|
||||
"LONGDATETIME",
|
||||
"SERVICEOUTPUT",
|
||||
"NOTIFICATIONAUTHORNAME",
|
||||
"NOTIFICATIONCOMMENT",
|
||||
"HOSTDISPLAYNAME",
|
||||
"SERVICEDISPLAYNAME",
|
||||
"USEREMAIL"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -51,16 +51,17 @@
|
|||
"setup": {
|
||||
"copy": [
|
||||
"files/utils.py >> /tmp/utils.py",
|
||||
"files/configs/notifications.conf >> /tmp/no_spam.conf",
|
||||
"files/configs/notifications.conf >> /tmp/notifications.conf",
|
||||
"files/configs/ido_checkresults.conf >> /tmp/ido_checkresults.conf",
|
||||
"files/configs/groups.conf >> /tmp/groups.conf"
|
||||
],
|
||||
"exec": [
|
||||
"sudo mv /etc/icinga2/conf.d/generic-service.conf /etc/icinga2/conf.d/generic-service.conf.bak",
|
||||
"sudo mv /etc/icinga2/conf.d/notifications.conf /etc/icinga2/conf.d/notifications.conf.bak",
|
||||
"sudo mv /etc/icinga2/conf.d/groups.conf /etc/icinga2/conf.d/groups.conf.bak",
|
||||
"sudo mv /tmp/groups.conf /etc/icinga2/conf.d/",
|
||||
"sudo mv /tmp/ido_checkresults.conf /etc/icinga2/conf.d/",
|
||||
"sudo mv /tmp/no_spam.conf /etc/icinga2/conf.d/",
|
||||
"sudo mv /tmp/notifications.conf /etc/icinga2/conf.d/",
|
||||
"sudo service icinga2 restart"
|
||||
]
|
||||
},
|
||||
|
@ -71,7 +72,8 @@
|
|||
"sudo mv /etc/icinga2/conf.d/groups.conf.bak /etc/icinga2/conf.d/groups.conf",
|
||||
"sudo mv /etc/icinga2/conf.d/generic-service.conf.bak /etc/icinga2/conf.d/generic-service.conf",
|
||||
"sudo rm /etc/icinga2/conf.d/ido_checkresults.conf",
|
||||
"sudo rm /etc/icinga2/conf.d/no_spam.conf",
|
||||
"sudo rm /etc/icinga2/conf.d/notifications.conf",
|
||||
"sudo mv /etc/icinga2/conf.d/notifications.conf.bak /etc/icinga2/conf.d/notifications.conf",
|
||||
"sudo service icinga2 restart"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue