Page 1 of 3

Issues with setting up alerting

Posted: Wed Jan 12, 2011 11:02 pm
by dbsaust
Hi.

I have been struggling with this for a few days now, but despite trying every variable possible I can not get email alerts to be sent to contacts/groups, the only alerts are going out to the email address attached to the user nagios admin.

Things I have done
Made sure notifications are enabled
Generated test mails successfully
Generated mails to any email address associated with USER nagios admin.
Set-up several contacts, making sure time periods are 24x7 and host/service options are set to d u r f s and assigned the contacts to the host for alerts
added host/service command = Notify-host-by-Email or XI_host_event_handler or XI_host_notification_handeler
Set-up contact groups and added contacts into group, then assigned the group to the host
made sure the contacts are assigned to the group and then adding the group to the contact etc

I thought i was already pretty familiar with the Nagios tool from previous job's. But I can't help think either I'm not, the installation is faulty, or I am missing something obvious. Any support would be welcomed, please advise if you need any log/config files to assist troubleshooting.

Re: Issues with setting up alerting

Posted: Thu Jan 13, 2011 11:32 am
by rdedon
Hello,
some additional information would be great. Config/logs and screenshots from CCM/contacts/modify may be helpful. Also, was this off of a generic template? Are there any possible firewall issues that may prevent users from receiving?

I am trying to duplicate the issue here on a test machine.

Thanks!

Re: Issues with setting up alerting

Posted: Thu Jan 13, 2011 6:41 pm
by dbsaust
I have attached all config files, I am only testing on the host AAAATEST once this is working i will roll out to all other hosts.
Also screen shot of the contact Manager and the Contact group that manger belongs too.

Re: Firewall issues, there seems no problem with this side as when i select alerting to go to myself (nagiosadmin) any email entered against nagios admin is successfully receiving test alerts.
1294899481.tar.gz
Groupt_Manager.JPG
Contact_Manager.JPG

Re: Issues with setting up alerting

Posted: Fri Jan 14, 2011 11:04 am
by mguthrie
The configurations looks like they should work ok, so I'm sure we're just missing something small somewhere. Are these contacts also "users" for the XI interface? If they are you may want to check the following page to make sure the notifications are turned on for the user settings.

Login or Masquerade as the user(s) who isn't receiving notifications.
Configuration->My Account Settings->Notification Preferences - make sure your preferred checkboxes are selected.
->Notification Methods - make sure the email checkbox is selected.

If those additional contacts are not XI users, and are only contacts, try matching the settings for the nagiosadmin exactly. Particularly, set your template to generic-contact, xi_generic_contact.

Re: Issues with setting up alerting

Posted: Sun Jan 16, 2011 6:18 pm
by dbsaust
They are only Contacts, so I can confirm alerts go to user details with no issue. But do not go to contacts.


Also Does the user email address override anything in the contacts email address?

Re: Issues with setting up alerting

Posted: Mon Jan 17, 2011 5:28 pm
by mguthrie
We'll have to see if we can recreate your issue.
Also Does the user email address override anything in the contacts email address?
The XI user management panel will create contacts if that option is selected, so if the name is the same I'm guessing it would override the CCM settings.

Re: Issues with setting up alerting

Posted: Mon Jan 17, 2011 6:37 pm
by dbsaust
Ok thanks, my site is currently in development, so If functionality is available I would be happy to provide remote access to my setup.
I refreshed all the contact settings and escalation groups yesterday and started again, with the same results.

Re: Issues with setting up alerting

Posted: Tue Jan 18, 2011 2:35 pm
by mguthrie
I discussed this with our lead developer today, and it sounds like XI is designed to have it's contact's set up through the Admin->Manage Users page, more than the Core Config Manager. Here's a document that explains the details of this, and how XI differs from Core.

http://assets.nagios.com/downloads/nagi ... ndcontacts

Re: Issues with setting up alerting

Posted: Thu Jan 20, 2011 12:32 am
by dbsaust
Ok, i have set all contacts up as users now, but still can not seem to get any of the additional address' configured to work.
Summary
Email address for notification coming from User email address only
so $CONTACTEMAIL$ within xi_host_notification_handler is not reading from contact details
Also i cannot get $CONTACTPAGER$ or $CONTACTADDRESSn$ (where n = 1-6 etc) to be picked up. Should adding the parameters to xi_host_notification_handler be sufficient?

i.e for Pager in xi_host_notification_handler
/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=host --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --contactpager="$CONTACTPAGER$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$" --datetime="$LONGDATETIME$"

Re: Issues with setting up alerting

Posted: Thu Jan 20, 2011 1:54 pm
by mguthrie
Are you using the Core Config Manager to handle contact settings, or the XI user account settings? I don't know all of the ins and outs of how XI controls the contact settings, but I recommend managing all of your user's settings for email, notifications, timeperiods, etc from the Configure->My Account Settings, and then the multiple Notification settings pages. Email notifications are disabled by default for a new user in XI.