Hi,
I´ve set the notification interval to 0 at icinga director service and host notification and notification template, but everytime an error occurs I get multiple mails.
template Notification "Technikcrew Service" {
command = "mail-service-notification"
interval = 0s
states = [ Critical, OK, Warning ]
types = [ Acknowledgement, Problem, Recovery ]
}
apply Notification "Technikcrew Service Benachrichtigung" to Service {
import "Technikcrew Service"
interval = 0s
assign where service.enable_notifications
states = [ Critical, OK, Warning ]
users = [ "technikcrew" ]
}
Any hint how to check, where this interval might be triggered?
1 Like
You mention the director, has the deployment been pushed after the changes?
Which versions of icignaweb2/director/icinga2 are you using?
These director settings were pushed since a long time, but I hadn´t the time to debug it further. I am using:
Icinga r2.13.1-1
Director 1.8.1
Icinga2 Web 2.9.3
jbrost
(Julian Brost)
September 1, 2021, 5:00pm
4
When do you get these notifications? Like do you receive all of them at once when the service goes into a problem state? Or are they delayed as if they are renotifications using the interval (even though that should be disabled)?
Mails are received every 4 minutes - so there is an interval active, but I don´t know where. I´ve also checked the notifications.conf at /etc/icinga2:
apply Notification "mail-icingaadmin" to Host {
import "mail-host-notification"
user_groups = host.vars.notification.mail.groups
users = host.vars.notification.mail.users
interval = 0
//vars.notification_logtosyslog = true
assign where host.vars.notification.mail
}
apply Notification "mail-icingaadmin" to Service {
import "mail-service-notification"
user_groups = host.vars.notification.mail.groups
users = host.vars.notification.mail.users
interval = 0
//vars.notification_logtosyslog = true
assign where host.vars.notification.mail
}
It seems that the check intervall is the same like the notification intervall. The service is checked every 4 minutes.
jbrost
(Julian Brost)
September 2, 2021, 7:56am
7
Have you set volatile = true
on the service by any chance? At least that would explain the behavior: Advanced Topics - Icinga 2
Can you share the relevant objects from the output of icinga2 object list
(Host, Service, Notification)?
2 Likes
Yes, volatile = true by default at the service templates. I will disable it!
Object 'analytics.xy.at!ssl_cert' of type 'Service':
% declared in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 648:1-648:24
* __name = "analytics.xy.at!ssl_cert"
* action_url = ""
* check_command = "ssl_cert"
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 84:5-84:26
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 102:5-102:26
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 651:5-651:30
* check_interval = 240
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 86:5-86:23
* check_period = ""
* check_timeout = 90
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 88:5-88:23
* command_endpoint = ""
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 96:5-96:27
* display_name = "ssl_cert"
* enable_active_checks = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 90:5-90:31
* enable_event_handler = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 92:5-92:31
* enable_flapping = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 93:5-93:26
* enable_notifications = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 89:5-89:31
* enable_passive_checks = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 91:5-91:32
* enable_perfdata = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 94:5-94:26
* event_command = ""
* flapping_ignore_states = null
* flapping_threshold = 0
* flapping_threshold_high = 30
* flapping_threshold_low = 25
* groups = [ "extern" ]
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 652:5-652:25
* host_name = "analytics.xy.at"
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 648:1-648:24
* icon_image = ""
* icon_image_alt = ""
* max_check_attempts = 5
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 85:5-85:28
* name = "ssl_cert"
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 648:1-648:24
* notes = ""
* notes_url = ""
* package = "director"
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 648:1-648:24
* retry_interval = 120
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 87:5-87:23
* source_location
* first_column = 1
* first_line = 648
* last_column = 24
* last_line = 648
* path = "/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf"
* templates = [ "ssl_cert", "linux-extern", "linux-snmp-checks", "host var overrides (Director)" ]
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 648:1-648:24
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 99:1-99:31
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 83:1-83:36
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/001-director-basics.conf', lines 28:3-28:43
* type = "Service"
* vars = null
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/001-director-basics.conf', lines 43:7-43:50
* volatile = true
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_templates.conf', lines 95:5-95:19
* zone = "TE-Icinga-VM.linz.xy.at"
% = modified in '/var/lib/icinga2/api/packages/director/0c17ed51-0fe8-4930-945a-619edcaddfe6/zones.d/director-global/service_apply.conf', lines 648:1-648:24
1 Like