I use the director configuration approach.
A badhost!slack-notifications-notification-hosts will be generated.
But my channel configuration #ops-on-call will be overriden by the default #monitoring_alerts.
Relevant output icinga2 object list --name 'badhost!slack-notifications-notification-hosts'
% declared in '/etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf', lines 57:1-57:67
* __name = "badhost!slack-notifications-notification-hosts"
...
* templates = [ "slack-notifications-notification-hosts", "slack-notifications-user-configuration-hosts", "slack-notifications-default-configuration-hosts", "slack-notifications-configuration", "slack-notifications-user-configuration", "slack-notifications-default-configuration" ]
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf', lines 57:1-57:67
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-user-configuration.conf', lines 8:1-8:68
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf', lines 51:1-51:71
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf', lines 39:1-39:57
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-user-configuration.conf', lines 1:0-1:61
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf', lines 1:0-1:64
...
* slack_notifications_channel = "#monitoring_alerts"
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-user-configuration.conf', lines 11:5-11:53
% = modified in '/etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf', lines 60:3-60:57
...
I guess the last one will override.
The following can be found on the relevant lines/
tail -n +11 < /etc/icinga2/zones.d/global-templates/slack-notifications-user-configuration.conf | head -n 1
vars.slack_notifications_channel = "#ops-on-call"
Defined in template slack-notifications-user-configuration-hosts
tail -n +60 < /etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf | head -n 1
I use the director configuration approach. A
badhost!slack-notifications-notification-hosts
will be generated. But my channel configuration#ops-on-call
will be overriden by the default#monitoring_alerts
.Relevant output
icinga2 object list --name 'badhost!slack-notifications-notification-hosts'
I guess the last one will override.
The following can be found on the relevant lines/
tail -n +11 < /etc/icinga2/zones.d/global-templates/slack-notifications-user-configuration.conf | head -n 1
Defined in template
slack-notifications-user-configuration-hosts
tail -n +60 < /etc/icinga2/zones.d/global-templates/slack-notifications-configuration.conf | head -n 1
Defined in template
slack-notifications-notification-hosts
slack-notifications-user-configuration
but this has the same effect.templates
somehow, therefore i included it inicinga2 object list ...
output.