Thank you very much for helping me Michael. It’s nice to see advice from Icinga Master.
Thank you @Wolfgang , I think that was the main problem.
(I found more misconfigurations in the end but I didn’t get what volatile checkbox does)
I started to write answers but I tested it for long to be correct with my answer so sorry for long responding time.
Notifications are working now so we can close this issue.
Cheers,
Stepan
Just if you are interested, I am posting some answers from my old configuration that I wrote before.
So here are some of my answers:
Can you show the Notification object from within Icinga combined from the template tree?
[root@icingaserver sdavid]# icinga2 object list --type Notification --name *Jenkins*notification-service*
[...]
Object 'jenkinsbuild2x.server.cz!Jenkins_TCP!notification-service' of type 'Notification':
% declared in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 1:0-1:51
* __name = "jenkinsbuild2x.server.cz!Jenkins_TCP!notification-service"
* command = "notify-command-service"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 6:5-6:38
* command_endpoint = ""
* host_name = "jenkinsbuild2x.server.cz"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 1:0-1:51
* interval = 7200
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 7:5-7:17
* name = "notification-service"
* package = "director"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 1:0-1:51
* period = "workday1"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 8:5-8:23
* service_name = "Jenkins_TCP"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 1:0-1:51
* source_location
* first_column = 0
* first_line = 1
* last_column = 51
* last_line = 1
* path = "/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf"
* states = [ "Critical", "OK", "Warning" ]
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 9:5-9:38
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 5:5-5:38
* templates = [ "notification-service", "notification-template-service" ]
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 1:0-1:51
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 1:0-1:52
* times
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 2:5-5:5
* begin = 1
* end = 3
* type = "Notification"
* types = [ "Custom", "DowntimeEnd", "DowntimeRemoved", "DowntimeStart", "FlappingEnd", "FlappingStart", "Problem", "Recovery" ]
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 10:5-18:5
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 6:5-15:5
* user_groups = null
* users = [ "sdavid", "tbohunek" ]
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_templates.conf', lines 19:5-19:36
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 16:5-16:36
* vars
* notification_interval = "120"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 17:5-17:38
* zone = "master"
% = modified in '/var/lib/icinga2/api/packages/director/dbab72c4-d067-4d2b-92b2-2c373bd153ea/zones.d/director-global/notification_apply.conf', lines 1:0-1:51
...
Can you show a list/screenshot of the notification mails happening here?
Here is screenshot from Outlook.
jenkinsbuild1x has exactly the same configuration in Icinga and it’s replication of jenkinsbuild2x.
Maybe I didn’t mentioned that I have the same issue with all my services and notifications.
If you want to see notification history from Icinga I can send it too.
.
Can you enable the debug log and trigger such a notification e.g. with a dummy service just notifying you … I would be interested in the interval of the notification event logging.
I don’t know how to make dummy service to send notifications via director because it is “OK” so it doesn’t send anything.
Here is the debug log without dummy (I hope that it helps anyway somehow)
[root@icingaserver sdavid]# tail -f /var/log/icinga2/debug.log | grep mail
[2019-02-14 13:00:41 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:41 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 4434
[2019-02-14 13:00:41 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:41 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 4442
[2019-02-14 13:00:41 +0100] notice/Process: PID 4434 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:41 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:00:41 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 4434, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:41 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:00:41 +0100] notice/Process: PID 4442 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:41 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:00:41 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 4442, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:41 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:00:56 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:56 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5036
[2019-02-14 13:00:56 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:56 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5037
[2019-02-14 13:00:56 +0100] notice/Process: PID 5037 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:56 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:00:56 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5037, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:56 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:00:56 +0100] notice/Process: PID 5036 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:56 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:00:56 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5036, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:00:56 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:01:11 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5209
[2019-02-14 13:01:11 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5210
[2019-02-14 13:01:11 +0100] notice/Process: PID 5210 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:01:11 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5210, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:01:11 +0100] notice/Process: PID 5209 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:01:11 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5209, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:01:11 +0100] notice/Process: PID 5209 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:01:11 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5209, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:01:26 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5401
[2019-02-14 13:01:26 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5402
[2019-02-14 13:01:26 +0100] notice/Process: PID 5402 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:01:26 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5402, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:01:26 +0100] notice/Process: PID 5401 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:01:26 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5401, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:01:26 +0100] notice/Process: PID 5401 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:01:26 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5401, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:01:26 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:02:11 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:02:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5739
[2019-02-14 13:02:11 +0100] notice/Process: Running command '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:02:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU': PID 5740
[2019-02-14 13:02:11 +0100] notice/Process: PID 5740 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:02:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:02:11 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5740, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:02:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'tomas.bohunek@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
[2019-02-14 13:02:11 +0100] notice/Process: PID 5739 ('/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:02:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67
[2019-02-14 13:02:11 +0100] warning/PluginNotificationTask: Notification command for object 'myczvl1dd0scm1.ux.mbid.cz!CPU' (PID: 5739, arguments: '/etc/icinga2/scripts/mail-service-notification.sh' '-d' '2019-02-14 13:02:11 +0100' '-e' 'CPU' '-n' 'scmdrcx' '-o' 'CRITICAL: CPU Idle = 1.69% ' '-r' 'stepan.david@moneta.cz' '-s' 'CRITICAL' '-t' 'PROBLEM' '-u' 'CPU') terminated with exit code 67, output: WARNING: RunAsUser for MSP ignored, check group ids (egid=298, want=51)
Is there a specific reason to use times.begin
and times.end
in that low window? I’m not sure if that would work here with the notification component running in a 5 second timer interval.
No there is not any specific reason. I just thought that it would be better to use lower numbers for testing and that 5s would be enough.
…