Page 1 of 1
Need help defining a single contact for multiple users
Posted: Mon Aug 31, 2020 7:59 am
by smccambly
Hello Nagios experts!
I have had a request from one of our SysAdmin teams that they want to use a single group email account for notifications for their hosts and services, however we still want them to be defined as individual users for the purpose of logging-in to Nagios and managing services, etc...
I assume I could simply put the group email address for each of the users on that team, but that would not be ideal in case there were occasions in the future where specific individuals needed to be notified for selected services or escalations.
I apologise if this is a simple question but I'm new to Nagios and can't wrap my head around how to do accomplish this. If I define a new contact with the group email and only associate that with the list of hosts, will that not disable the ability for the individual SysAdmins to manage their objects?
Most of the information/documentation talks about adding *more* email destinations, not less

.
Is this possible & if so how do I go about making it happen? We are currently running XI 5.5.4 on linux (and plan to upgrade soon).
Thanks!
-Scott
Re: Need help defining a single contact for multiple users
Posted: Mon Aug 31, 2020 5:43 pm
by benjaminsmith
Hi Scott,
You can have multiple notification contacts for hosts and services. You can even create contact groups which are a collection of contacts who will be notified.
My thinking would be to create a new contact in the CCM ( Core Configuration Manager ) for this shared email, call it contact_all or something. This contact in the CCM would not have any effect on the individual user's accounts in Nagios XI.
A couple of docs to help get you started here, and let me know if you have more questions. Then you could assign this as the notification to your hosts and services or individually if desired.
Understanding Users and Contacts
Using The Core Config Manager For Host Management
Using The Core Config Manager For Service Management
Re: Need help defining a single contact for multiple users
Posted: Wed Sep 02, 2020 2:25 pm
by smccambly
Hello again,
I have read those documents and I understand the basic concepts, but again they talk mostly about extending the notifications to more users, not limiting it.
Here is my main question/concern. From the documentation:
1) A user is typically "connected" to a contact for the purposes of both enabling notifications and obtaining permission to see and modify hosts and services.
2) While it isn't necessary for contacts to have a relationship with a user, they most often do in order to ensure the user can use the Nagios XI web interface.
3) In normal operation, Nagios XI users are directly associated to NagiosCore contacts with a one-to-one relationship, and
4) 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 as the Nagios XI User's username.
Ok great. But next the documentation says this: "If you wish to define a relationship between a pre-existing Nagios Core contact and a new Nagios XI user, you modify the Nagios Core contact's configuration information using the Core Config Manager. If you wish to break an existing user ↔ contact relationship, you can change the contact's configuration details to use values other than those described above."
This is where I get lost. What values do I modify??? If I have a contact named "Fred" and want to associate it with a user named "Joe" how can I do it?
So again, If I have 10 users who all need to login to Nagios to see and manage their services, but they all want notification to a single unique email, do I need to set each of their email fields to this unique email, or is there a way to just have the special Contact be defined for their hosts and services.
Also, if I define each of these users to have the same single email and set them all as contacts, would that mean that 10 emails would be sent when a service goes down?
What is the best way to configure Nagios XI to respond to this requirement, or is it even possible?
Thanks again,
-Scott
Re: Need help defining a single contact for multiple users
Posted: Thu Sep 03, 2020 1:10 pm
by ssax
You can't link a user with a contact unless the contact name matches the username exactly. It's a one-to-one relationship, you can't have a single user mapped to multiple contacts. The mapping is literally that the contact name has to match (case-sensitive) to what the username is.
The only thing I can think of would be that you add another contact that has a distribution list as an email and use that to notify, then disable notifications for all the contacts. That way you get the notifications from the dist list contacts and the permissions from the non-notifying contacts.
That's the only way I can think of to do that.