Page 1 of 3

Email notifications are missing

Posted: Thu May 05, 2016 9:05 pm
by absarcompass
Hi Guys,
It has happened again that I just receive an sms notification of a problem but not email notification.
today I have an example if you guys can help me out from the logs
below are two events of problem and recovery where i receive sms but no emails
May 6 11:13:39 nagiosxi nagios: SERVICE NOTIFICATION: cns-oncall-mobile;PSU - Albany-SM45;SM45 Partial AC Fail Alarm;CRITICAL;notify-service-by-Mobile;SNMP CRITICAL - *4*
May 6 11:13:39 nagiosxi nagios: SERVICE NOTIFICATION: Cns_Operations_Email;PSU - Albany-SM45;SM45 Partial AC Fail Alarm;CRITICAL;xi_service_notification_handler;SNMP CRITICAL - *4*
May 6 11:13:39 nagiosxi nagios: SERVICE NOTIFICATION: Wireless-Working-Hours 8-6;PSU - Albany-SM45;SM45 Partial AC Fail Alarm;CRITICAL;xi_host_notification_handler;SNMP CRITICAL - *4*



May 6 11:33:38 nagiosxi nagios: SERVICE NOTIFICATION: cns-oncall-mobile;PSU - Albany-SM45;SM45 AC Fail Alarm;OK;notify-service-by-Mobile;SNMP OK - 0
May 6 11:33:38 nagiosxi nagios: SERVICE NOTIFICATION: Cns_Operations_Email;PSU - Albany-SM45;SM45 AC Fail Alarm;OK;xi_service_notification_handler;SNMP OK - 0
May 6 11:33:38 nagiosxi nagios: SERVICE NOTIFICATION: Wireless-Working-Hours 8-6;PSU - Albany-SM45;SM45 AC Fail Alarm;OK;xi_host_notification_handler;SNMP OK - 0
log says that it has send the email notifications to the contact groups but we didn't get any.
(All email settings are correct and no email address has any issue, we are receiving email notifications smoothly)

here is the mail log of the same period, can't find anything related to these error that could have caused this issue.
Why it is trying to send the email to root? is it designed that way ?
May 6 11:12:58 nagiosxi postfix/local[48324]: DC964E23: to=<[email protected]>, orig_to=<root>, relay=local, delay=153, delays=153/0.02/0/0.05, dsn=5.2.2, status=bounced (cannot update mailbox /var/mail/root for user root. error writing message: File too large)
Thanks.

Re: Email notifications are missing

Posted: Thu May 05, 2016 10:51 pm
by Box293
absarcompass wrote:May 6 11:13:39 nagiosxi nagios: SERVICE NOTIFICATION: Wireless-Working-Hours 8-6;PSU - Albany-SM45;SM45 Partial AC Fail Alarm;CRITICAL;xi_host_notification_handler;SNMP CRITICAL - *4*

May 6 11:33:38 nagiosxi nagios: SERVICE NOTIFICATION: Wireless-Working-Hours 8-6;PSU - Albany-SM45;SM45 AC Fail Alarm;OK;xi_host_notification_handler;SNMP OK - 0
I suspect your "Wireless-Working-Hours 8-6" contact has the wrong command assigned.

CCM > Contacts > Edit Contact > Alert Settings tab
Click the Manage Service Notification Commands button
This should be xi_service_notification_handler

Re: Email notifications are missing

Posted: Sun May 08, 2016 7:41 pm
by absarcompass
Hi,
Thanks for pointing that out :)
But today i have face the same email notification issue.
May 9 12:22:11 nagiosxi nagios: SERVICE NOTIFICATION: Cns_Operations_Email;SWITCH - cmetro-sw1.na;cisco_ports;CRITICAL;xi_service_notification_handler;CRITICAL: host 'x.x.x.x', interfaces up: 12, down: 1, dormant: 0, excluded: 1, unused: 0<BR>Gi0/1: down -> ## SPARE ##<BR>
May 9 12:22:53 nagiosxi postfix/local[13436]: 203943942: to=<[email protected]>, relay=local, delay=0.01, delays=0/0/0/0, dsn=5.2.2, status=bounced (cannot update mailbox /var/mail/root for user root. error writing message: File too large)
from web interface
ciscoport-email-notification.PNG
What settings I have to check for this?
This particular service is assigned with contactgoup that has this contact. I am receiving notifications from services on this contact.

Re: Email notifications are missing

Posted: Sun May 08, 2016 7:46 pm
by Box293
I suspect your mailbox is too large. Have a look at thios

http://www.electrictoolbox.com/postfix- ... rge-error/

Re: Email notifications are missing

Posted: Sun May 08, 2016 11:12 pm
by absarcompass
Hi
I have increased the sizes but still not getting the email notification
mailbox_size_limit = 30000000
message_size_limit = 10240000
Does it work the same way that it send notifications to user root's mail?

Re: Email notifications are missing

Posted: Mon May 09, 2016 10:01 am
by rkennedy
Are you using SMTP or Sendmail? Can you PM over a profile for us to look at? (Admin -> System Profile -> Download Profile)

Re: Email notifications are missing

Posted: Mon May 09, 2016 4:50 pm
by absarcompass
Hi
We are using smtp. Have send you the profile

Thanks

Re: Email notifications are missing

Posted: Mon May 09, 2016 4:52 pm
by rkennedy
The profile you sent was actually the text version, we'll need to look at the raw files. Can you upload it somewhere else and PM the link over?

EDIT: Profile received.

Re: Email notifications are missing

Posted: Mon May 09, 2016 5:05 pm
by absarcompass
I'll part the raw files in chunks.
Thanks

Re: Email notifications are missing

Posted: Mon May 09, 2016 7:35 pm
by absarcompass
Hi Guys,
Thanks for your help.
I Have found the issue. Email Contact defined in Contact Group that I was using to get notified was not a NagiosXI user so, I have to use notify-host-by-email instead of xi_host_notification_handler under Alert Settings> Manage Host Notification Commands and for service notification too.
Email notifications that I was getting for few hosts and services have had Contact nagiosadmin in combination with Contact Group, that might have triggered the emails locally I suppose as I was not getting any smtp logs in my /var/log/maillog

Cheers!