Hello Icinga community.
I have an icinga HA setup as descdibed below:
+--------- HA ---------+
| |
v v
+---------------+ +---------------+
| Master1 |<---->| Master2 |
+---------------+ +---------------+
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\/
+---------------+
| Azure Satellite|
+---------------+
Everything works. But I haven’t achieved to make it so that my hosts in azure zone get their notifications send by the satellite but rather notifications are being sent by the master zone hosts. So currently master zone send all notifications. Also duplicate alerts happen sometimes thats when azure zone and master zone both send a sms for the same issue.
I’ve defined my notification in global-templates zone which is being synced to both master and azure zone.
This is how it’s currently defined:
/\* SMS ALERTS \*/
apply Notification "sms-host" to Host {
import "normal-notification-template"
import "host-notification-template"
command = "sms-notification"
vars.notif_type = "host"
user_groups = host.vars.notification.sms.groups
zone = host.zone
assign where host.vars.notification.sms && typeof(host.vars.notification.sms) == Dictionary
}
apply Notification "sms-service" to Service {
import "normal-notification-template"
import "service-notification-template"
command = "sms-notification"
vars.notif_type = "service"
user_groups = service.vars.notification.sms.groups
zone = host.zone
assign where service.vars.notification.sms && typeof(service.vars.notification.sms) == Dictionary
}
So essentially the question is. How do i force the notifications for objects in azure zone to be sent out only by the satellite?
Info on setup below.
icinga2 - The Icinga 2 network monitoring daemon (version: r2.16.0-1)
Platform: Red Hat Enterprise Linux
Platform version: 9.8 (Plow)
Master1
Enabled features: api checker command ido-mysql mainlog notification perfdata syslog
Master2
Enabled features: api checker command ido-mysql mainlog notification perfdata syslog
Satellite
Enabled features: api checker command mainlog notification perfdata syslog
icinga2 object list --type Zone
Object 'master' of type 'Zone':
% declared in '/etc/icinga2/zones.conf', lines 16:1-16:20
* \__name = "master"
* endpoints = \[ "master1.example.com", "master2.example.com" \]
% = modified in '/etc/icinga2/zones.conf', lines 17:2-17:69
* global = false
* name = "master"
* package = "\_etc"
* parent = ""
* source_location
* first_column = 1
* first_line = 16
* last_column = 20
* last_line = 16
* path = "/etc/icinga2/zones.conf"
* templates = \[ "master" \]
% = modified in '/etc/icinga2/zones.conf', lines 16:1-16:20
* type = "Zone"
* zone = ""
Object 'azure' of type 'Zone':
% declared in '/etc/icinga2/zones.conf', lines 23:1-23:19
* \__name = "azure"
* endpoints = \[ "satellite.example.com" \]
% = modified in '/etc/icinga2/zones.conf', lines 24:2-24:42
* global = false
* name = "azure"
* package = "\_etc"
* parent = "master"
% = modified in '/etc/icinga2/zones.conf', lines 25:2-25:18
* source_location
* first_column = 1
* first_line = 23
* last_column = 19
* last_line = 23
* path = "/etc/icinga2/zones.conf"
* templates = \[ "azure" \]
% = modified in '/etc/icinga2/zones.conf', lines 23:1-23:19
* type = "Zone"
* zone = ""
Object 'global-templates' of type 'Zone':
% declared in '/etc/icinga2/zones.conf', lines 28:1-28:30
* \__name = "global-templates"
* endpoints = null
* global = true
% = modified in '/etc/icinga2/zones.conf', lines 29:2-29:14
* name = "global-templates"
* package = "\_etc"
* parent = ""
* source_location
* first_column = 1
* first_line = 28
* last_column = 30
* last_line = 28
* path = "/etc/icinga2/zones.conf"
* templates = \[ "global-templates" \]
% = modified in '/etc/icinga2/zones.conf', lines 28:1-28:30
* type = "Zone"
* zone = ""
Any help is appreciated. Thanks in advance.