Nagios XI email notification delivery problem
Nagios XI email notification delivery problem
Hello,
I am having some issues with the email notification delivery on Nagios XI.
I have followed exactly this documentation https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Previously I have successfully migrated all the config files (hosts, users, services etc) from my old Nagios core 3.0.6 to the new Nagios XI 5.4.10. Everything shows correctly. I have also successfully configured Postfix in order to forward all mails to my Exchange server and testing mails works ok, but when linking every host and service to the respective contact_groups I am not getting any new notification.
On maillog I don't see any logs apart from sending to nagios@localhost. No new mail delivery to the addresses I have on contacts and contact_groups.
What do you suggest to see?
Thank you
Enid
I am having some issues with the email notification delivery on Nagios XI.
I have followed exactly this documentation https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Previously I have successfully migrated all the config files (hosts, users, services etc) from my old Nagios core 3.0.6 to the new Nagios XI 5.4.10. Everything shows correctly. I have also successfully configured Postfix in order to forward all mails to my Exchange server and testing mails works ok, but when linking every host and service to the respective contact_groups I am not getting any new notification.
On maillog I don't see any logs apart from sending to nagios@localhost. No new mail delivery to the addresses I have on contacts and contact_groups.
What do you suggest to see?
Thank you
Enid
Re: Nagios XI email notification delivery problem
Hi @enid,
Lets first try to check your configurations by running the command below and post the output.
Also send a test email to see if the Nagios server can send email to an account by going to:
Configure->My Account Settings->Send Test Notifications.
Then, check to see if the test email arrives
Lets first try to check your configurations by running the command below and post the output.
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Configure->My Account Settings->Send Test Notifications.
Then, check to see if the test email arrives
Re: Nagios XI email notification delivery problem
Hello,
Please find below the result of the command:
Meanwhile if I make a Send test email from the web panel the mail gets delivered to the specified address correctly. But I am not seeing anything regarding this delivery on the /var/log/maillog file ...
Thanks,
Enid
Please find below the result of the command:
Code: Select all
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Duplicate definition found for service 'Usage of disks' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 364)
Warning: Duplicate definition found for service 'Usage of disks' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 354)
Warning: Duplicate definition found for service 'Network interface status' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 334)
Warning: Duplicate definition found for service 'Network interface status' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 324)
Warning: Duplicate definition found for service 'Delta sessions' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 304)
Warning: Duplicate definition found for service 'Delta sessions' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 294)
Warning: Duplicate definition found for service 'Current Load' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 273)
Warning: Duplicate definition found for service 'Current Load' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 262)
Warning: Duplicate definition found for service 'CPU Load' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 240)
Warning: Duplicate definition found for service 'CPU Load' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 229)
Warning: Duplicate definition found for service 'Check Streamserve' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 188)
Warning: Duplicate definition found for service 'Check Paging' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 168)
Warning: Duplicate definition found for service 'Check Paging' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 158)
Warning: Duplicate definition found for service 'Check Oracle' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 127)
Warning: Duplicate definition found for service 'check Databck01' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 76)
Warning: Duplicate definition found for service 'Check AIX_filesystem' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 36)
Warning: Duplicate definition found for service 'Check AIX_filesystem' on host 'bphomo' (config file '/usr/local/nagios/etc/services/_multiple_hosts.cfg', starting on line 26)
Warning: Duplicate definition found for service 'check Databck01' on host 'bpbackup' (config file '/usr/local/nagios/etc/services/bpbackup.cfg', starting on line 16)
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 107 services.
Checked 18 hosts.
Checked 2 host groups.
Checked 0 service groups.
Checked 8 contacts.
Checked 7 contact groups.
Checked 159 commands.
Checked 9 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 18 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 9 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check
Thanks,
Enid
Re: Nagios XI email notification delivery problem
Hi @ enid ,
The problem you are facingusually happens if you import the "static" directory config files in Nagios XI.
You can resolve this by running the following command and then applying configuration:
Please restart nagios after by establish a terminal session on your XI and run
The problem you are facing
Code: Select all
Warning: Duplicate definition found for service
You can resolve this by running the following command and then applying configuration:
Code: Select all
curl -s http://assets.nagios.com/downloads/nagiosxi/scripts/fix_static_import| mysql -pnagiosxi nagiosql
Code: Select all
service nagios restart
Re: Nagios XI email notification delivery problem
I executed the sql script and restarted nagios service but again with:
I get the same output as before. Please take notice that also on the old Nagios core I get the same output and I don't have the email notification delivery issue.
Is there any specific email or notification configuration that I should check or some specific logs in order to troubleshoot the issue?
Thank you,
Enid
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Is there any specific email or notification configuration that I should check or some specific logs in order to troubleshoot the issue?
Thank you,
Enid
Re: Nagios XI email notification delivery problem
Can you show us some of your mail logs?
Also, you said you linked the contact_groups for hosts/services? In the Core Config Manager --> Alert settings --> Manage contact groups? (Is this the spot?)
Code: Select all
tail -50 /var/log/maillog
Re: Nagios XI email notification delivery problem
Hi,
Please find below the latest lines of maillog
On postfix main.cf I have made this change in order to relay the mails to our Exchange mailserver and the send test mail works ok
I see something strange because one of the addresses configured to get mails as notifications works ok (shown on the logs as sgal.test@socgen.com), meanwhile all the other addresses configured on Contacts do not work.
I think the configuration of Contacts and Host/Service notifications has been done correctly but I don't know why it doesn't work.
The assigned command for host and service notifications are respectively: notify-host-by-email and notify-service-by-email.
The configuration has been done on: Core Config Manager --> Monitoring menu --> Hosts/Service (one by one) --> Alert Settings --> Manage Contact Groups --> assigning the correct Contact Group
Thanks,
Enid
Please find below the latest lines of maillog
Code: Select all
Oct 20 09:47:19 nagiosxi postfix/pickup[29827]: 794C3135B: uid=0 from=<root>
Oct 20 09:47:19 nagiosxi postfix/cleanup[29834]: 794C3135B: message-id=<20171020074719.794C3135B@nagiosxi.sgalb.socgen>
Oct 20 09:47:19 nagiosxi postfix/qmgr[29826]: 794C3135B: from=<root@nagiosxi.sgalb.socgen>, size=448, nrcpt=1 (queue active)
Oct 20 09:47:19 nagiosxi postfix/smtp[29836]: 794C3135B: to=<enid.vrenozaj@socgen.com>, relay=192.168.x.x[192.168.x.x]:25, delay=0.37, delays=0.06/0.07/0/0.24, dsn=2.6.0, status=sent (250 2.6.0 <20171020074719.794C3135B@nagiosxi.sgalb.socgen> [InternalId=2134782] Queued mail for delivery)
Oct 20 09:47:19 nagiosxi postfix/qmgr[29826]: 794C3135B: removed
Oct 20 09:49:09 nagiosxi postfix/pickup[29827]: 272A1136E: uid=500 from=<nagios>
Oct 20 09:49:09 nagiosxi postfix/cleanup[30477]: 272A1136E: message-id=<20171020074909.272A1136E@nagiosxi.sgalb.socgen>
Oct 20 09:49:09 nagiosxi postfix/qmgr[29826]: 272A1136E: from=<nagios@nagiosxi.sgalb.socgen>, size=792, nrcpt=1 (queue active)
Oct 20 09:49:09 nagiosxi postfix/local[30479]: 272A1136E: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 09:49:09 nagiosxi postfix/qmgr[29826]: 272A1136E: removed
Oct 20 09:50:12 nagiosxi postfix/pickup[29827]: 7BAF8137D: uid=0 from=<root>
Oct 20 09:50:12 nagiosxi postfix/cleanup[30477]: 7BAF8137D: message-id=<20171020075012.7BAF8137D@nagiosxi.sgalb.socgen>
Oct 20 09:50:12 nagiosxi postfix/qmgr[29826]: 7BAF8137D: from=<root@nagiosxi.sgalb.socgen>, size=10396, nrcpt=1 (queue active)
Oct 20 09:50:12 nagiosxi postfix/local[30479]: 7BAF8137D: to=<root@nagiosxi.sgalb.socgen>, orig_to=<root>, relay=local, delay=0.11, delays=0.08/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 09:50:12 nagiosxi postfix/qmgr[29826]: 7BAF8137D: removed
Oct 20 09:52:39 nagiosxi postfix/pickup[29827]: 137FA10EE: uid=500 from=<nagios>
Oct 20 09:52:39 nagiosxi postfix/cleanup[31612]: 137FA10EE: message-id=<20171020075239.137FA10EE@nagiosxi.sgalb.socgen>
Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 137FA10EE: from=<nagios@nagiosxi.sgalb.socgen>, size=828, nrcpt=1 (queue active)
Oct 20 09:52:39 nagiosxi postfix/pickup[29827]: 1E76710ED: uid=500 from=<nagios>
Oct 20 09:52:39 nagiosxi postfix/cleanup[31612]: 1E76710ED: message-id=<20171020075239.1E76710ED@nagiosxi.sgalb.socgen>
Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 1E76710ED: from=<nagios@nagiosxi.sgalb.socgen>, size=834, nrcpt=1 (queue active)
Oct 20 09:52:39 nagiosxi postfix/local[31616]: 1E76710ED: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.13, delays=0.1/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 1E76710ED: removed
Oct 20 09:52:39 nagiosxi postfix/smtp[31614]: 137FA10EE: to=<sgal.test@socgen.com>, relay=192.168.x.x[192.168.x.x]:25, delay=0.48, delays=0.09/0.02/0/0.38, dsn=2.6.0, status=sent (250 2.6.0 <20171020075239.137FA10EE@nagiosxi.sgalb.socgen> [InternalId=2134856] Queued mail for delivery)
Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 137FA10EE: removed
Oct 20 09:55:13 nagiosxi postfix/pickup[29827]: 31D86110F: uid=0 from=<root>
Oct 20 09:55:13 nagiosxi postfix/cleanup[32512]: 31D86110F: message-id=<20171020075513.31D86110F@nagiosxi.sgalb.socgen>
Oct 20 09:55:13 nagiosxi postfix/qmgr[29826]: 31D86110F: from=<root@nagiosxi.sgalb.socgen>, size=10396, nrcpt=1 (queue active)
Oct 20 09:55:13 nagiosxi postfix/local[32514]: 31D86110F: to=<root@nagiosxi.sgalb.socgen>, orig_to=<root>, relay=local, delay=0.12, delays=0.07/0.01/0/0.04, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 09:55:13 nagiosxi postfix/qmgr[29826]: 31D86110F: removed
Oct 20 09:57:36 nagiosxi postfix/pickup[29827]: 73D71112C: uid=500 from=<nagios>
Oct 20 09:57:36 nagiosxi postfix/cleanup[829]: 73D71112C: message-id=<20171020075736.73D71112C@nagiosxi.sgalb.socgen>
Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 73D71112C: from=<nagios@nagiosxi.sgalb.socgen>, size=825, nrcpt=1 (queue active)
Oct 20 09:57:36 nagiosxi postfix/pickup[29827]: 79CFA112A: uid=500 from=<nagios>
Oct 20 09:57:36 nagiosxi postfix/cleanup[829]: 79CFA112A: message-id=<20171020075736.79CFA112A@nagiosxi.sgalb.socgen>
Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 79CFA112A: from=<nagios@nagiosxi.sgalb.socgen>, size=819, nrcpt=1 (queue active)
Oct 20 09:57:36 nagiosxi postfix/local[831]: 73D71112C: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.1, delays=0.07/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 73D71112C: removed
Oct 20 09:57:36 nagiosxi postfix/smtp[832]: 79CFA112A: to=<sgal.test@socgen.com>, relay=192.168.x.x[192.168.x.x]:25, delay=0.3, delays=0.07/0.01/0/0.22, dsn=2.6.0, status=sent (250 2.6.0 <20171020075736.79CFA112A@nagiosxi.sgalb.socgen> [InternalId=2134915] Queued mail for delivery)
Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 79CFA112A: removed
Oct 20 10:00:13 nagiosxi postfix/pickup[29827]: 50E8F114F: uid=0 from=<root>
Oct 20 10:00:13 nagiosxi postfix/cleanup[1779]: 50E8F114F: message-id=<20171020080013.50E8F114F@nagiosxi.sgalb.socgen>
Oct 20 10:00:13 nagiosxi postfix/qmgr[29826]: 50E8F114F: from=<root@nagiosxi.sgalb.socgen>, size=10396, nrcpt=1 (queue active)
Oct 20 10:00:13 nagiosxi postfix/local[1781]: 50E8F114F: to=<root@nagiosxi.sgalb.socgen>, orig_to=<root>, relay=local, delay=0.11, delays=0.07/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 10:00:13 nagiosxi postfix/qmgr[29826]: 50E8F114F: removed
Oct 20 10:03:31 nagiosxi postfix/pickup[29827]: C458D1177: uid=500 from=<nagios>
Oct 20 10:03:31 nagiosxi postfix/cleanup[2896]: C458D1177: message-id=<20171020080331.C458D1177@nagiosxi.sgalb.socgen>
Oct 20 10:03:31 nagiosxi postfix/qmgr[29826]: C458D1177: from=<nagios@nagiosxi.sgalb.socgen>, size=778, nrcpt=1 (queue active)
Oct 20 10:03:31 nagiosxi postfix/local[2898]: C458D1177: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.09, delays=0.07/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Oct 20 10:03:31 nagiosxi postfix/qmgr[29826]: C458D1177: removed
Code: Select all
relayhost = [192.168.x.x]
I think the configuration of Contacts and Host/Service notifications has been done correctly but I don't know why it doesn't work.
The assigned command for host and service notifications are respectively: notify-host-by-email and notify-service-by-email.
The configuration has been done on: Core Config Manager --> Monitoring menu --> Hosts/Service (one by one) --> Alert Settings --> Manage Contact Groups --> assigning the correct Contact Group
Thanks,
Enid
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Nagios XI email notification delivery problem
when using XI notification handlers, the core contact information becomes irrelevant as the XI contact information supersedes it.enid wrote:Hi,
Please find below the latest lines of maillogOn postfix main.cf I have made this change in order to relay the mails to our Exchange mailserver and the send test mail works okCode: Select all
Oct 20 09:47:19 nagiosxi postfix/pickup[29827]: 794C3135B: uid=0 from=<root> Oct 20 09:47:19 nagiosxi postfix/cleanup[29834]: 794C3135B: message-id=<20171020074719.794C3135B@nagiosxi.sgalb.socgen> Oct 20 09:47:19 nagiosxi postfix/qmgr[29826]: 794C3135B: from=<root@nagiosxi.sgalb.socgen>, size=448, nrcpt=1 (queue active) Oct 20 09:47:19 nagiosxi postfix/smtp[29836]: 794C3135B: to=<enid.vrenozaj@socgen.com>, relay=192.168.x.x[192.168.x.x]:25, delay=0.37, delays=0.06/0.07/0/0.24, dsn=2.6.0, status=sent (250 2.6.0 <20171020074719.794C3135B@nagiosxi.sgalb.socgen> [InternalId=2134782] Queued mail for delivery) Oct 20 09:47:19 nagiosxi postfix/qmgr[29826]: 794C3135B: removed Oct 20 09:49:09 nagiosxi postfix/pickup[29827]: 272A1136E: uid=500 from=<nagios> Oct 20 09:49:09 nagiosxi postfix/cleanup[30477]: 272A1136E: message-id=<20171020074909.272A1136E@nagiosxi.sgalb.socgen> Oct 20 09:49:09 nagiosxi postfix/qmgr[29826]: 272A1136E: from=<nagios@nagiosxi.sgalb.socgen>, size=792, nrcpt=1 (queue active) Oct 20 09:49:09 nagiosxi postfix/local[30479]: 272A1136E: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 09:49:09 nagiosxi postfix/qmgr[29826]: 272A1136E: removed Oct 20 09:50:12 nagiosxi postfix/pickup[29827]: 7BAF8137D: uid=0 from=<root> Oct 20 09:50:12 nagiosxi postfix/cleanup[30477]: 7BAF8137D: message-id=<20171020075012.7BAF8137D@nagiosxi.sgalb.socgen> Oct 20 09:50:12 nagiosxi postfix/qmgr[29826]: 7BAF8137D: from=<root@nagiosxi.sgalb.socgen>, size=10396, nrcpt=1 (queue active) Oct 20 09:50:12 nagiosxi postfix/local[30479]: 7BAF8137D: to=<root@nagiosxi.sgalb.socgen>, orig_to=<root>, relay=local, delay=0.11, delays=0.08/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 09:50:12 nagiosxi postfix/qmgr[29826]: 7BAF8137D: removed Oct 20 09:52:39 nagiosxi postfix/pickup[29827]: 137FA10EE: uid=500 from=<nagios> Oct 20 09:52:39 nagiosxi postfix/cleanup[31612]: 137FA10EE: message-id=<20171020075239.137FA10EE@nagiosxi.sgalb.socgen> Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 137FA10EE: from=<nagios@nagiosxi.sgalb.socgen>, size=828, nrcpt=1 (queue active) Oct 20 09:52:39 nagiosxi postfix/pickup[29827]: 1E76710ED: uid=500 from=<nagios> Oct 20 09:52:39 nagiosxi postfix/cleanup[31612]: 1E76710ED: message-id=<20171020075239.1E76710ED@nagiosxi.sgalb.socgen> Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 1E76710ED: from=<nagios@nagiosxi.sgalb.socgen>, size=834, nrcpt=1 (queue active) Oct 20 09:52:39 nagiosxi postfix/local[31616]: 1E76710ED: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.13, delays=0.1/0.02/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 1E76710ED: removed Oct 20 09:52:39 nagiosxi postfix/smtp[31614]: 137FA10EE: to=<sgal.test@socgen.com>, relay=192.168.x.x[192.168.x.x]:25, delay=0.48, delays=0.09/0.02/0/0.38, dsn=2.6.0, status=sent (250 2.6.0 <20171020075239.137FA10EE@nagiosxi.sgalb.socgen> [InternalId=2134856] Queued mail for delivery) Oct 20 09:52:39 nagiosxi postfix/qmgr[29826]: 137FA10EE: removed Oct 20 09:55:13 nagiosxi postfix/pickup[29827]: 31D86110F: uid=0 from=<root> Oct 20 09:55:13 nagiosxi postfix/cleanup[32512]: 31D86110F: message-id=<20171020075513.31D86110F@nagiosxi.sgalb.socgen> Oct 20 09:55:13 nagiosxi postfix/qmgr[29826]: 31D86110F: from=<root@nagiosxi.sgalb.socgen>, size=10396, nrcpt=1 (queue active) Oct 20 09:55:13 nagiosxi postfix/local[32514]: 31D86110F: to=<root@nagiosxi.sgalb.socgen>, orig_to=<root>, relay=local, delay=0.12, delays=0.07/0.01/0/0.04, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 09:55:13 nagiosxi postfix/qmgr[29826]: 31D86110F: removed Oct 20 09:57:36 nagiosxi postfix/pickup[29827]: 73D71112C: uid=500 from=<nagios> Oct 20 09:57:36 nagiosxi postfix/cleanup[829]: 73D71112C: message-id=<20171020075736.73D71112C@nagiosxi.sgalb.socgen> Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 73D71112C: from=<nagios@nagiosxi.sgalb.socgen>, size=825, nrcpt=1 (queue active) Oct 20 09:57:36 nagiosxi postfix/pickup[29827]: 79CFA112A: uid=500 from=<nagios> Oct 20 09:57:36 nagiosxi postfix/cleanup[829]: 79CFA112A: message-id=<20171020075736.79CFA112A@nagiosxi.sgalb.socgen> Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 79CFA112A: from=<nagios@nagiosxi.sgalb.socgen>, size=819, nrcpt=1 (queue active) Oct 20 09:57:36 nagiosxi postfix/local[831]: 73D71112C: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.1, delays=0.07/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 73D71112C: removed Oct 20 09:57:36 nagiosxi postfix/smtp[832]: 79CFA112A: to=<sgal.test@socgen.com>, relay=192.168.x.x[192.168.x.x]:25, delay=0.3, delays=0.07/0.01/0/0.22, dsn=2.6.0, status=sent (250 2.6.0 <20171020075736.79CFA112A@nagiosxi.sgalb.socgen> [InternalId=2134915] Queued mail for delivery) Oct 20 09:57:36 nagiosxi postfix/qmgr[29826]: 79CFA112A: removed Oct 20 10:00:13 nagiosxi postfix/pickup[29827]: 50E8F114F: uid=0 from=<root> Oct 20 10:00:13 nagiosxi postfix/cleanup[1779]: 50E8F114F: message-id=<20171020080013.50E8F114F@nagiosxi.sgalb.socgen> Oct 20 10:00:13 nagiosxi postfix/qmgr[29826]: 50E8F114F: from=<root@nagiosxi.sgalb.socgen>, size=10396, nrcpt=1 (queue active) Oct 20 10:00:13 nagiosxi postfix/local[1781]: 50E8F114F: to=<root@nagiosxi.sgalb.socgen>, orig_to=<root>, relay=local, delay=0.11, delays=0.07/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 10:00:13 nagiosxi postfix/qmgr[29826]: 50E8F114F: removed Oct 20 10:03:31 nagiosxi postfix/pickup[29827]: C458D1177: uid=500 from=<nagios> Oct 20 10:03:31 nagiosxi postfix/cleanup[2896]: C458D1177: message-id=<20171020080331.C458D1177@nagiosxi.sgalb.socgen> Oct 20 10:03:31 nagiosxi postfix/qmgr[29826]: C458D1177: from=<nagios@nagiosxi.sgalb.socgen>, size=778, nrcpt=1 (queue active) Oct 20 10:03:31 nagiosxi postfix/local[2898]: C458D1177: to=<nagios@localhost.sgalb.socgen>, orig_to=<nagios@localhost>, relay=local, delay=0.09, delays=0.07/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 20 10:03:31 nagiosxi postfix/qmgr[29826]: C458D1177: removed
I see something strange because one of the addresses configured to get mails as notifications works ok (shown on the logs as sgal.test@socgen.com), meanwhile all the other addresses configured on Contacts do not work.Code: Select all
relayhost = [192.168.x.x]
I think the configuration of Contacts and Host/Service notifications has been done correctly but I don't know why it doesn't work.
The assigned command for host and service notifications are respectively: notify-host-by-email and notify-service-by-email.
The configuration has been done on: Core Config Manager --> Monitoring menu --> Hosts/Service (one by one) --> Alert Settings --> Manage Contact Groups --> assigning the correct Contact Group
Thanks,
Enid
take a look at your commands, and see how these are defined. this should help to identify what exactly is going on. by default, this set should respect your local linux mail system. (/usr/bin/mail)I think the configuration of Contacts and Host/Service notifications has been done correctly but I don't know why it doesn't work.
The assigned command for host and service notifications are respectively: notify-host-by-email and notify-service-by-email.
when you take a look at the xi_host(/service)_notification_handler, then expect your 'manage email settings' page to work, as well as your user's XI settings.
Re: Nagios XI email notification delivery problem
The commands definition on /usr/local/nagios/etc/commands.cfg are as below:
and if I test with the mail gets delivered ok.
I am not sure regarding the configuration I have done on Contacts and Contact Groups and the relation between this notification definitions above and the xi handlers (which I haven't used at all).
Code: Select all
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
Code: Select all
echo test | /bin/mail -s test enid.vrenozaj@socgen.com
I am not sure regarding the configuration I have done on Contacts and Contact Groups and the relation between this notification definitions above and the xi handlers (which I haven't used at all).
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios XI email notification delivery problem
@enid , Your commands seem to be ok.
In the XI web interface click on your username in top right corner.
Please make sure that you checked appropriate alert types in notifications preferences. Check the box that says enable notifications.
Then go to Notification methods and check receive alerts via email.
If above recommendations don't work please send in your Nagios XI System Profile.
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it here, or you can send it in PM.
If you choose to send it in a pm please notify us here when you send it.
In the XI web interface click on your username in top right corner.
Please make sure that you checked appropriate alert types in notifications preferences. Check the box that says enable notifications.
Then go to Notification methods and check receive alerts via email.
If above recommendations don't work please send in your Nagios XI System Profile.
To send us your system profile. Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and upload it here, or you can send it in PM.
If you choose to send it in a pm please notify us here when you send it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.