Addon Addresses for XI Users

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
nveeder
Posts: 20
Joined: Fri Feb 01, 2013 2:54 pm

Addon Addresses for XI Users

Post by nveeder »

Nagios XI 2012R1.6
RHEL 5.8 x64

If I create a Nagios XI user and select the option to Create as a Monitoring Contact, do settings for the corresponding Nagios Core contact still get applied? For example, if I use the Contacts page in CCM to edit the new core contact's Addon Address fields should I expect that notifications are sent to each email address I've added? The core contact is using the xi_host_notification_handler and xi_service_notification_handler notification commands from the xi_generic_contact template.
It seems that only the email address that is set for the Nagios XI User receives notifications. I've read the XI_Users_And_Contacts.pdf, but am not understanding this point.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Addon Addresses for XI Users

Post by lmiltchev »

Nagios XI users are set with the "xi_host_notification_handler" and "xi_service_notification_handler". If you need to change the user's email, you should do it by going to:

Admin->Manage Users->Edit (not via CCM->Contacts->Modify)

In contrast, contacts use "notify-host-by-email" and "notify-service-by-email" handlers. The "XI_Users_And_Contacts.pdf" document, just explains how to create and break relationships between contacts and users in XI.

Note: Users can modify their notifications options, but contacts cannot.
Be sure to check out our Knowledgebase for helpful articles and solutions!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Addon Addresses for XI Users

Post by slansing »

If the contact is assigned to the monitoring object "host/service" etc. it's notification settings will be used, you will also need to use the following notification handlers for contacts:

notify-host-by-email and notify-service-by-email

You can view our documentation on the differences between contacts and users here:

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

And also our FAQ section here, under Contacts:

http://support.nagios.com/wiki/index.php/Nagios_XI:FAQs
nveeder
Posts: 20
Joined: Fri Feb 01, 2013 2:54 pm

Re: Addon Addresses for XI Users

Post by nveeder »

I understand now that the Addon Address fields on the Contact page will not be applied if the contact is set to use "xi_host_notification_handler" and "xi_service_notification_handler". As Admin->Manage Users->Edit only allows setting one email address, that will not accomplish what I need.
The reason I was using Nagios XI Users is that this seemed to be the simplest way to customize notifications for different contacts. If I stop using the xi notification handlers for these contacts, how do I customize notifications on a per contact basis? I guess I would need to make new notification commands for each custom notification and assign those to the appropriate contacts, correct?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Addon Addresses for XI Users

Post by abrist »

You would not need to make new commands unless you needed a unique command per user. You could use the notify-*-by-email, but by doing so you will break the XI user management for that contact.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
nveeder
Posts: 20
Joined: Fri Feb 01, 2013 2:54 pm

Re: Addon Addresses for XI Users

Post by nveeder »

How do I customize notifications on a per contact basis?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Addon Addresses for XI Users

Post by slansing »

How do I customize notifications on a per contact basis?
You can modify the contacts be navigating to:

Configure > Core Config Manager > Contacts

There you should see a listing of your defined contacts, simply open one, make the changes, then click save, and Apply Configuration on the page it returns you to.
nveeder
Posts: 20
Joined: Fri Feb 01, 2013 2:54 pm

Re: Addon Addresses for XI Users

Post by nveeder »

Yes, that is how to get to Contact Management. I thought it would be apparent there was more to the question from the context of this thread.
To summarize: I understand now that if I am using the xi handlers that relate a Nagios XI user to a core contact that settings on the core contact's page such as "Addon Address 1" will not be applied. For a contact to have multiple email addresses, I'll need to specify notification commands other than xi-*-notification-handler. As the notify-host-by-email and notify-service-by-email commands include the text for the notifications as part of the commands, I should expect to create a new command for each custom notification I want to use.
If I've misstated something or if there is a simpler way to go about this, please let me know.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Addon Addresses for XI Users

Post by abrist »

nveeder wrote: As the notify-host-by-email and notify-service-by-email commands include the text for the notifications as part of the commands, I should expect to create a new command for each custom notification I want to use.
If I've misstated something or if there is a simpler way to go about this, please let me know.
The notify-*-by-email commands use macros so unless you need some very unique notifications, the standard notify-*-by-email commands should work fine for most alerts. You are correct though, that if you want heavily customized alerts, that it is more cumbersome to do it the core way with the notify-*-by-email commands. You could also copy the XI handlers and edit them to your liking, but it may be a pain to get the second+ email addresses passed to the handle_nagioscore_notification.php script.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Addon Addresses for XI Users

Post by sreinhardt »

As Abrist mentioned, I was going to suggest that you might write a script to take in the variables needed for xi-*-notification handler, and then take your contact and loop through each email address that they have, replacing the email address and otherwise using the notification handler. Might get tricky, however I think it should work for what you need.
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.
Locked