Mail notifications not being sent for some users

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Mail notifications not being sent for some users

Post by Fred Kroeger »

I have 4 contacts with all them being a member of the same Contact Group - "Nagios-Alerts"
Mail is being delivered successfully to only 3 of the contacts. Checking the maillog file I can see that the 3 email addresses are spooled for every notification. However there is nothing in the logfile to show that the email for the fourth contact has been sent from NagiosXI.
Excerpt from the contacts.cfg file below
Emails to fred.kroeger , IT SMS Alerts & User2 are sent & received OK. The email to IT Alerts however never gets sent.
IT SMS Alerts & IT Alerts are Contacts only. Fred,kroeger & User2 are defined as Users and their personal Notification preferences have been set to Enable notifications - and they are working correctly.
So, for some reason the email to "IT Alerts" doesn't get sent from Nagios. It does have a valid email address but this is not the issue as it's email never leaves the Nagios server. They all appear to be configured correctly. The only difference between the contacts and the user accounts are that the IT Alerts & IT SMS Alerts are configured to only send Host alerts - but as the IT SMS alert account gets the email it would appear that this is not the problem.
Any ideas on what I can check next or trace to see why the email is not being spooled for the one contact?
Regards... Fred

Code: Select all

define contact {
    contact_name                     fred.kroeger
    alias                            Fred Kroeger - FONTT Pty Ltd (Nagios Admin)
    contactgroups                    Nagios-Alerts
    host_notifications_enabled       1
    service_notifications_enabled    1
    host_notification_period         24x7
    service_notification_period      24x7
    host_notification_options        d,u,r
    service_notification_options     w,u,c,r,f
    host_notification_commands       xi_host_notification_handler
    service_notification_commands    xi_service_notification_handler
    can_submit_commands              1
    email                            fred.kroeger@XXX
    use                              xi_contact_generic
}

define contact {
    contact_name                     IT Alerts
    alias                            DL for IT Notifications
    contactgroups                    Nagios-Alerts
    host_notifications_enabled       1
    service_notifications_enabled    0
    host_notification_period         24x7
    service_notification_period      24x7
    host_notification_options        d,r,
    service_notification_options     w,c,
    host_notification_commands       xi_host_notification_handler
    service_notification_commands    xi_service_notification_handler
    can_submit_commands              1
    email                            italerts@XXX
}

define contact {
    contact_name                     IT SMS Alerts
    alias                            DL for SMS Notifications
    contactgroups                    Nagios-Alerts
    host_notifications_enabled       1
    service_notifications_enabled    0
    host_notification_period         24x7
    service_notification_period      24x7
    host_notification_options        d,
    service_notification_options     w,c,
    host_notification_commands       notify-host-by-sms
    service_notification_commands    xi_service_notification_handler
    can_submit_commands              1
    email                            it-mobile-alerts@XXX
}

define contact {
    contact_name                     User2
    alias                            IT Officer
    contactgroups                    Nagios-Alerts
    host_notifications_enabled       1
    service_notifications_enabled    1
    host_notification_period         24x7
    service_notification_period      24x7
    host_notification_options        d,u,r,f,s,
    service_notification_options     w,u,c,r,f,s,
    email                            X@XXX
    use                              xi_contact_generic
}
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail notifications not being sent for some users

Post by scottwilkerson »

I see the IT Alerts user is set to use XI user notification handlers

Code: Select all

    host_notification_commands       xi_host_notification_handler
    service_notification_commands    xi_service_notification_handler
If you login or masquerade as the user, can you confirm the users notification settings are enabled by clicking the username in top right and go to "Notification Preferences"?
Also check the Time periods tab

Then look under "Notification Methods" and make sure "Receive alerts via email." is checked.

https://assets.nagios.com/downloads/nag ... ntacts.pdf
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Mail notifications not being sent for some users

Post by Fred Kroeger »

Hi Scott
As I mentioned in the original post, IT Alerts is just a contact - it is not defined as a user.
Thanks for the pdf link you provided. Reading this it appears that xi_host/service_notification_handler only works for Users and not manually created Contacts. I have now changed the notification commands to notify-host/service-by-email .
Unfortunately, that now means I lose the ability to use the Inbound email features. I guess my only option is to create a Dummy User called IT Alerts so that I can use the xi_notification_handler commands.

Regards... Fred
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail notifications not being sent for some users

Post by scottwilkerson »

Fred Kroeger wrote:Hi Scott
As I mentioned in the original post, IT Alerts is just a contact - it is not defined as a user.
Thanks for the pdf link you provided. Reading this it appears that xi_host/service_notification_handler only works for Users and not manually created Contacts. I have now changed the notification commands to notify-host/service-by-email .
Unfortunately, that now means I lose the ability to use the Inbound email features. I guess my only option is to create a Dummy User called IT Alerts so that I can use the xi_notification_handler commands.

Regards... Fred
Yes that would be the only option as the inbound feature also requires an XI user vs. just a contact
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Mail notifications not being sent for some users

Post by Fred Kroeger »

Thanks Scott - you can close this one
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mail notifications not being sent for some users

Post by scottwilkerson »

Fred Kroeger wrote:Thanks Scott - you can close this one
Great!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked