Email notifications are missing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Email notifications are missing

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Email notifications are missing

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: Email notifications are missing

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Email notifications are missing

Post by Box293 »

I suspect your mailbox is too large. Have a look at thios

http://www.electrictoolbox.com/postfix- ... rge-error/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: Email notifications are missing

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Email notifications are missing

Post by rkennedy »

Are you using SMTP or Sendmail? Can you PM over a profile for us to look at? (Admin -> System Profile -> Download Profile)
Former Nagios Employee
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: Email notifications are missing

Post by absarcompass »

Hi
We are using smtp. Have send you the profile

Thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Email notifications are missing

Post 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.
Former Nagios Employee
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: Email notifications are missing

Post by absarcompass »

I'll part the raw files in chunks.
Thanks
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: Email notifications are missing

Post 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!
Locked