Hello - we are using Nagios XI 2014R2.6, orginally installed via the Vmware OVF. We're seeing this situation:
I've created a new contact with a valid email address. I go into Core Config - services and select any of my services, then click on Alert Settings. I go into Manage Contacts and add the newly created contact. However, the contact never receives any emails when alerts are generated. If i go back in and remove the new contact and put myself in instead I receive all expected emails. I'm scratching my head. I look at /var/log/messages and do not see any errors. If i tail /var/log/maillog I don't even see any attempts to initiate an email to the new contact.
Any help is appreciated.
Emails not being sent?
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Emails not being sent?
It sounds like maybe you're getting beat up by object inheritance.
The things to look out for are what templates and settings are applied to your contact definition, and also what templates and settings are applied to the user in question. Templates are applied first with contact specific settings overriding them.
Take a look at your alert settings tab for that contact and make sure you don't see any settings that could override/disable notifications. If you don't see the problem jumping out at you backtrack through your templates and try to find the problem. if all else fails, try to clone your contact into the new contact then only change the necessary settings and see if that works.
Let us know how it goes!
The things to look out for are what templates and settings are applied to your contact definition, and also what templates and settings are applied to the user in question. Templates are applied first with contact specific settings overriding them.
Take a look at your alert settings tab for that contact and make sure you don't see any settings that could override/disable notifications. If you don't see the problem jumping out at you backtrack through your templates and try to find the problem. if all else fails, try to clone your contact into the new contact then only change the necessary settings and see if that works.
Let us know how it goes!
Re: Emails not being sent?
That's one that I did not try, I will give that a shot - thanks!jdalrymple wrote:if all else fails, try to clone your contact into the new contact then only change the necessary settings and see if that works.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Emails not being sent?
Sounds great.
Post back if it doesn't work so we can try something else!
Post back if it doesn't work so we can try something else!
Re: Emails not being sent?
So I duplicated my contact and changed only the e-mail address. No dice, no alerts to the new address. Again I looked in /var/log/messages and /var/log/maillog and there are no attempts to send the message out at all.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Emails not being sent?
Cloning the contact won't put that contact (named something like mycontact_copy_1) into any notification groups for individual services or hosts - you'd still have to do that. If you're using contactgroups defined in the contact then that will copy over.
What I'm getting at is - did you verify that however you're getting notified with the source of the copy, did you make sure that you have a similar configuration for the clone? Can you identify "where" the notification is defined for your working contact and add in the copied contact?
Regarding your debugging method of checking your maillog, are you using sendmail to send notifications or smtp? (Admin --> System Config --> Manage Email Settings) If you're using smtp that wouldn't show up in your maillog.
One way that we might be able to hurry along trying to troubleshoot this would be if you could send us your profile.zip. If we don't go that route I feel like we're going to be looking at one config after another. You can get us a profile by going Admin --> System Profile --> Download Profile
If you do send us the profile please PM it. If you choose not to go down that road that's fine too, we can figure it out one way or the other.
What I'm getting at is - did you verify that however you're getting notified with the source of the copy, did you make sure that you have a similar configuration for the clone? Can you identify "where" the notification is defined for your working contact and add in the copied contact?
Regarding your debugging method of checking your maillog, are you using sendmail to send notifications or smtp? (Admin --> System Config --> Manage Email Settings) If you're using smtp that wouldn't show up in your maillog.
One way that we might be able to hurry along trying to troubleshoot this would be if you could send us your profile.zip. If we don't go that route I feel like we're going to be looking at one config after another. You can get us a profile by going Admin --> System Profile --> Download Profile
If you do send us the profile please PM it. If you choose not to go down that road that's fine too, we can figure it out one way or the other.
Re: Emails not being sent?
Sorry I should have been more specific...
I have a service I'm using to test this on specifically, which is a URL content check. I set the content check so that it fails (looks for content that doesn't exist) and receive an email to myself (as expected), as I am the contact assigned. I reset the alert by changing the content check to be valid, so it goes back to OK. I then cloned my contact and changed the email on the clone. Then I changed my test service so that the cloned contact was assigned and I was no longer, and changed the content check to fail again. I see the failure in the GUI, but I see no alert traffic happening otherwise. The reason I tailed those two log files is because I do see other activity - for instance, when the contact is set to me i see the email sent in /maillog.
I verified that SendMail is enabled in the Email Settings section.
I'll PM the profile.zip, thank you for your help.
I have a service I'm using to test this on specifically, which is a URL content check. I set the content check so that it fails (looks for content that doesn't exist) and receive an email to myself (as expected), as I am the contact assigned. I reset the alert by changing the content check to be valid, so it goes back to OK. I then cloned my contact and changed the email on the clone. Then I changed my test service so that the cloned contact was assigned and I was no longer, and changed the content check to fail again. I see the failure in the GUI, but I see no alert traffic happening otherwise. The reason I tailed those two log files is because I do see other activity - for instance, when the contact is set to me i see the email sent in /maillog.
I verified that SendMail is enabled in the Email Settings section.
I'll PM the profile.zip, thank you for your help.
Re: Emails not being sent?
Go to the CCM->Services-><your service>->View Text Config (the diskette icon) and show us the config.I have a service I'm using to test this on specifically, which is a URL content check
Go to the CCM->Contacts-><"problem" contact>->View Text Config (the diskette icon) and show us the config.
Create a condition so that your service would go to hard "Critical" state, then go to:
Reports->State History and show us a screenshot of the page (showing the service in hard "Critical" state)
Reports->Notifications and show us a screenshot of the page
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Emails not being sent?
Hi - thanks, please see attached files.
You do not have the required permissions to view the files attached to this post.
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Emails not being sent?
Take a peek at this document:
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
The weird thing is that if you cloned a working contact what is in my head should have carried across. The interesting bit is the part at the bottom regarding notification commands. This is something set on a per contact/contactgroup basis, but usally comes down from a template. The deal is if you're using the wrong notification command then your system will try to do the snmp bit for the contact instead of the sendmail bit which you're expecting. It makes some sense, until you tell me that the cloned contact didn't work. It's probably worth a gander though.
If using sendmail - use notify-service-by-email
If using snmp - use xi_service_notification_handler
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf
The weird thing is that if you cloned a working contact what is in my head should have carried across. The interesting bit is the part at the bottom regarding notification commands. This is something set on a per contact/contactgroup basis, but usally comes down from a template. The deal is if you're using the wrong notification command then your system will try to do the snmp bit for the contact instead of the sendmail bit which you're expecting. It makes some sense, until you tell me that the cloned contact didn't work. It's probably worth a gander though.
If using sendmail - use notify-service-by-email
If using snmp - use xi_service_notification_handler