Email notification not working, test mail work.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rebug
Posts: 11
Joined: Fri Mar 12, 2021 9:08 am

Email notification not working, test mail work.

Post by rebug »

Hi ;) ,

I have been testing email configuration on my Nagios XI server.

My configuration is like that:

I use a monitoring contact (not linked with an user) so, I templated it with generic-contact (which contain notify-host-by-email and notify-service-by-email).

Then I Have a service where I activated notification on all status (for testing) and added my contact.

Even if I see "SERVICE NOTIFICATION" in Nagios.log, there is nothing in my mail log (except the mail sended via the test mail option)

I tried to force a notification with send custom notification in the service, it's not working.

I hope someone can help me,

Thank's !
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Email notification not working, test mail work.

Post by vtrac »

Hi,
Sorry, let see if I understand the issue:
You did not receive email notification for a service alert, right?

Does the "contacts" also NOT receiving the email notification as well?

Below is the KB article for understanding XI users and contacts:
https://assets.nagios.com/downloads/nag ... ntacts.pdf

Could you please upload screenshots of your alert settings? ... and "Manage Contacts" pages?
Here's where to go:
Nagios XI GUI > Configure > Core Config Manager > Services
Now, please select service you were testing > select the "Alert Settings" tab .... take screenshot of this page.
Also take screenshot of "Manage Contacts" and "Manage Contact Groups" pages, if they are not "0".

Also, please upload the "profile.zip":
Click the "Admin" menu > "System Config" > "System Profile"
Click the "Download Profile" button


Best Regards,
Vinh
rebug
Posts: 11
Joined: Fri Mar 12, 2021 9:08 am

Re: Email notification not working, test mail work.

Post by rebug »

That's right.

The contact does not receive notification via e-mail.

Here is the screenshots:
contact_management.png
service_management.png
managecontact.png
I have sended my profile via pm.
You do not have the required permissions to view the files attached to this post.
rebug
Posts: 11
Joined: Fri Mar 12, 2021 9:08 am

Re: Email notification not working, test mail work.

Post by rebug »

I tested creating a new user (and activate the options "Create as monitoring contact") and the email notification is working.

But I can't figure out why the email notification is not working with a simple contact. I can't create a new user each time I add a contact.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Email notification not working, test mail work.

Post by vtrac »

Hi,
I tested on XI 5.8.3 by creating a contact user "ctest1" (below) and it is working for me.

Here's how I created the user:

Code: Select all

Nagios XI GUI > Configure > Core Config Manager > Contacts > "Add New"
I tested by using both internal (Nagios.com) and outside (hotmail.com) email addresses, all worked just fine.
However, for the outside email, the notification email went into the "Junk" box instead of the "inbox"

Code: Select all

define contact {
        contact_name    ctest1
        alias   ctest1
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    r,w,u,c,f,s
        host_notification_options       r,d,u,f,s
        service_notification_commands   notify-service-by-email
        host_notification_commands      notify-host-by-email
        email   [email protected]
        minimum_importance      0
        host_notifications_enabled      1
        service_notifications_enabled   1
        can_submit_commands     1
        retain_status_information       1
        retain_nonstatus_information    1
        }
I looked at the "objects.cache" file and only see one contact (below) that I assumed is using "generic-contact" template. However, I am not sure why you have "notify-service-by-email,notify-service-by-email" list two times.

Code: Select all

define contact {
	contact_name	Michael Rassu
	alias	Michael Rassu
	service_notification_period	24x7
	host_notification_period	24x7
	service_notification_options	w,u,c,f,s
	host_notification_options	d,u
	service_notification_commands	notify-service-by-email,notify-service-by-email
	host_notification_commands	notify-host-by-email
	email	[email protected]
	minimum_importance	0
	host_notifications_enabled	1
	service_notifications_enabled	1
	can_submit_commands	1
	retain_status_information	1
	retain_nonstatus_information	1
	}
Could you please change the email address of "nagiosadmin" from "nagiosadmin@localhost" to a real email address that has a domain (Example: [email protected]). I know some mail server will block the email when it see the sender has not "domain" defined.

Now, please test sending email notification on the service that have contact "Michael Rassu" defined.
Th1.png

Best Regards,
Vinh
You do not have the required permissions to view the files attached to this post.
Locked