Contact notifications gone mad

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Contact notifications gone mad

Post by cellact »

Hi,
We've been running the latest XI on a CentOS VM for the past month with no issues.

Yesterday I tried adding a new contact and configured some services to send alerts to it, but noticed the emails were not arriving.
Nagios is configured to use our IIS SMTP relaying server and is working perfectly fine for any existing contacts.

I raised the debug level to 32 with verbosity of 2 to find out if the alerts are being sent, and found out Nagios is indeed notifying the contacts, atleast according to the debug log.
I looked at the SMTP server logs and couldn't find these relevant connections.
I couldn't find a place where Nagios shows a log of it's SMTP connections to the relay server. does this exist?

At this point I'm a little baffled. all contacts work fine, except for new ones I create or copy.
Another weird behavior was when I tried altering one of our contacts email address, but it kept sending alerts to the old address which was just replaced!

Seems like something is really messed up.

Any help would be appreciated,
Tal
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Contact notifications gone mad

Post by scottwilkerson »

Are you creating users or contacts? There is a big difference in how mail is delivered.

Here is a doc that goes over the differences

http://library.nagios.com/library/produ ... d-contacts
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Re: Contact notifications gone mad

Post by cellact »

I'm definitely creating contacts.
The way I understand it, these could be distribution groups etc., they don't need to have users created for them in order to receive alerts, right?

I'd be grateful if you could point me to a place where Nagios logs it's SMTP connections for notifications.

Thanks.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Contact notifications gone mad

Post by agriffin »

You're correct in thinking they don't need to be users to receive alerts. I'm not quite sure what's going on. Unfortunately, I don't think Nagios XI logs its SMTP interactions. Do your new contacts have identical notification commands configured?
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Re: Contact notifications gone mad

Post by cellact »

Yep, xi_service_event_handler.

I already stated I found the notification command for this contact in the Nagios debug log, but it fails to contact the SMTP server with it.

This is working fine for any existing contacts.

How can I escalate this issue?

Thanks,
Tal
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Re: Contact notifications gone mad

Post by cellact »

Well I finally managed to come up with a solution - although I'm pretty sure this is a bug.

I ended up adding a new user (which automatically added a new contact) and it's sending the notifications now.
Seems like all we had working were users. but it is definitely not sending notifications for contacts.

How can I open up a bug report?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Contact notifications gone mad

Post by scottwilkerson »

This is not a bug. The xi_service_event_handler & xi_host_event_handler cannot be used with just a contact, only an XI user.

This is outlined in the document mentioned above...

http://library.nagios.com/library/produ ... d-contacts
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Re: Contact notifications gone mad

Post by cellact »

I just read it again and I couldn't find anything that hints to what you're saying. how do you send notifications to a contact?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Contact notifications gone mad

Post by scottwilkerson »

These are only for Users
By default Nagios XI allows users to manage their notification preferences, notification times, and notification messages through the XI
web interface. This requires that each Nagios XI user has a direct relationship with a corresponding contact in Nagios Core.

The relationship between a Nagios XI user and a Nagios Core contact is established with the following configuration:
• There is a Nagios Core Contact with the same short name (e.g. jdoe) as the Nagios XI User's username (e.g. jdoe).
• The Nagios Core contact that corresponds to the user account must have the following properties:
◦ Host notification command is xi_host_notification_handler
◦ Service notification command is xi_service_notification_handler
◦ Host and service notification timeperiods are both set to <username>_notification_times (e.g. jdoe_notification_times)
For just contact you would generally use notify-host-by-email & notify-service-by-email however you need to make sure you have the corresponding mail program that the command uses installed on your server.

Code: Select all

which mail
Compare to the command in the command line definition at Configure -> CCM -> Commands -> notify-service-by-email -> Modify
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cellact
Posts: 69
Joined: Mon May 14, 2012 7:00 am

Re: Contact notifications gone mad

Post by cellact »

Thanks for your help.

I still insist this is not explained in the document above.. may be a good idea to clarify this in the next document version.

;)
Locked