Page 1 of 1

nagios email notifications not being sent

Posted: Fri Dec 07, 2012 1:53 pm
by benhank
2011 R3
I am having an issue in which my nagios server is configured properly to send mail via snmp.
when I click on the "send test email option, I get the email.

When I click on the "Send custom notification" option for an object there is no email.
i have verified that the contact has been set up properly, but this issue persists. what makes it worse is that my notifications were working fine, and then nagios started sending notifications to the wrong people. and then this issue began.
when we checked the mail log this baffling error cropped up:

nagiosserver postfix/snmp [10282] :host myironport firewall refused to talk to me.
My mail guy told me that nagios should not be touching the firewall as the firewall only checks external mail coming in from outside.


I forgot to mention that this is happening on all 4 or my nagios servers.

Re: nagios email notifications not being sent

Posted: Fri Dec 07, 2012 3:43 pm
by slansing
When your notifications were being sent to the wrong people, what happened to cause this do you think? What changes were being made to the system?

Re: nagios email notifications not being sent

Posted: Fri Dec 07, 2012 3:46 pm
by benhank
no there weren't any changes made. that's what baffled us. I have even deleted contacts but nagios still tried to email them, failed.

Re: nagios email notifications not being sent

Posted: Fri Dec 07, 2012 3:47 pm
by slansing
Under CCM > Content Management > Choose one of your contacts which is not receiving notifications > Let me know what you have defined under Manage Host Notification Commands, and Manage Service Notification Commands.

Re: nagios email notifications not being sent

Posted: Fri Dec 07, 2012 4:04 pm
by benhank

Code: Select all

define contact {
	contact_name                  		bhankers
	alias                         		Be
	contactgroups                 		Nagios Enterprise monitoring Team
	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,
	host_notification_commands    		notify-host-by-email
	service_notification_commands 		notify-service-by-email
	can_submit_commands           		1
	retain_status_information     		1
	retain_nonstatus_information  		1
	email                         		[email protected]
	use                           		xi_contact_generic,generic-contact,Nagios Monitoring team
	}	

Re: nagios email notifications not being sent

Posted: Sat Dec 08, 2012 1:27 am
by slansing
Your Service, and Host notification handlers need to be set to:

xi_host_notification_handler

xi_service_notification_handler

Re: nagios email notifications not being sent

Posted: Mon Dec 10, 2012 9:42 am
by benhank
Hey thanks! not only that but I had sendmail, and postfix set up wrong. I would have replied sooner but I had to exit stage right before i could. on a side note, whats the difference between the two settings?

Re: nagios email notifications not being sent

Posted: Mon Dec 10, 2012 10:15 am
by lmiltchev
The "xi_host_notification_handler" and "xi_service_notification_handler" are the default notification handlers in Nagios XI. They should be used by all users, including nagiosadmin. The "notify-host-by-email" and "notify-service-by-email" are notification handlers for contacts only (mainly used in Nagios Core). Contacts and users and similar but not the same. Please, review our documentation on the topic:

http://assets.nagios.com/downloads/nagi ... ntacts.pdf

Hope this helps.

Re: nagios email notifications not being sent

Posted: Mon Dec 10, 2012 10:30 am
by benhank
Thanks! you have really helped me on this one, now I wont be posting that I can't get multi tenancy working. =D
. you can lock this I am all set!

Re: nagios email notifications not being sent

Posted: Mon Dec 10, 2012 10:32 am
by lmiltchev
I am glad I could help! :D