NOtifications not received

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

NOtifications not received

Post by MSPk »

Hi Team,

We have cent a PoC environment for one of our clients and are monitoring around 10 hosts successfully. I have enabled some users on the ngaios and set alerts for them and added them to the hosts and services. However I'm not receiving any email alerts/notifiations. When I open the notifications window I see the email notification being sent out but i'm not receiving them into my mail box. please suggest.

PS: I'm able to receive the test notification/email from notification preferences page
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NOtifications not received

Post by slansing »

If you can run a simple test we may be able to get to the bottom of this pretty quick, please navigate to a service that one of the contacts is set up for, Home > Service Detail > 'service name' > Advanced > Send Custom Notification, and send a notification from this service, then, please run the following and share the output here. You can nix out the addresses:

Code: Select all

tail -50 /var/log/maillog
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: NOtifications not received

Post by MSPk »

Here is the output.

I have run this command at 5:30am Feb 27th and the last entry on the log is at 15:13 pm on Feb26th
notification_issue.docx
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NOtifications not received

Post by lmiltchev »

It seems like notifications have been sent - you can see in the log "status=sent"... Are you sure that your corporate mail is not blocking emails from <[email protected]>?
Be sure to check out our Knowledgebase for helpful articles and solutions!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NOtifications not received

Post by tmcdonald »

Check your SMTP server's logs and see if anything is blocking there. Could be that the test email is using sendmail and succeeding while postfix is getting caught at your relay.
Former Nagios employee
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: NOtifications not received

Post by MSPk »

I have managed to get this going...I have created contacts which are not user but they had the 'manage host commands' set to 'xi_host_notification_handler' i have chnaged it to 'notify-host-by-email' and it is working fine now. However I still have an issue with the nagios admin contact, it has the host command set to 'xi_host_notification_handler' but i dont get the notificatiosn for this contact. I have created another user with acontact and they both share the same attributes, the new is getting emails but not the nagios admin, please advise.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NOtifications not received

Post by lmiltchev »

Go to:

Admin->Manage Users->nagiosadmin->Edit

and see if this is the same email that you have listed for the nagiosadmin contact under:

CCM->Contacts->nagiosadmin->Modify

Note: "nagiosadmin" is a user, and uses the "default" "xi_host_notification_handler" and "xi_service_notification_handler", while "contacts only" use "notify-host-by-email" and "notify-service-by-email".

Can you send a test email successfully while logged in as nagiosadmin? Can you send a "custom" notification?

host/service->Advanced tab->Send custom notification
Be sure to check out our Knowledgebase for helpful articles and solutions!
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: NOtifications not received

Post by MSPk »

Hi team,

I have logged in as nagios admin and performed the below chks. I'm able to send the test notification and also the custom notification, however when I created a test service on a server, I didnt receive an email when threshold were breached, however I see the email being sent out in the notifications report. I have attched my contact and service defination below, please help.

Code: Select all

define contact {
	contact_name                  		nagiosadmin
	alias                         		Nagios Administrator
	host_notifications_enabled    		1
	service_notifications_enabled 		1
	host_notification_period      		nagiosadmin_notification_times
	service_notification_period   		nagiosadmin_notification_times
	host_notification_options     		d,u,r,
	service_notification_options  		w,u,c,r,
	host_notification_commands    		xi_host_notification_handler
	service_notification_commands 		xi_service_notification_handler
	email                         		[email protected]
	use                           		xi_contact_generic

Code: Select all

###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date:	      2014-03-05 12:49:00
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND --- 
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################

define service {
	host_name			Test
	service_description		Memory Usage
	use				xiwizard_windowsserver_nsclient_service
	check_command			check_xi_service_nsclient!password!MEMUSE!-w 85 -c 90!!!!!
	max_check_attempts		1
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notification_options		w,c,u,r,
	notifications_enabled		1
	contacts			nagiosadmin
	_xiwizard			windowsserver
	register			1
	}	

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
[img]
notification.png
[/img]
You do not have the required permissions to view the files attached to this post.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NOtifications not received

Post by sreinhardt »

Do you have smtp or sendmail configured for your mail settings within the admin page? Also have you checked the user preferences for notification options? Admin->Manage users-> Masquerade as the intended user-> click on the username in the upper right->Notification Preferences. Be sure enable notifications are checked, and that any notification types you wish to receive are checked.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: NOtifications not received

Post by MSPk »

Currently we have sendmail setup on this nagios server, I have enabled the notification as suggested but it is still the same.
Locked