Disable all notification contacts but one

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Disable all notification contacts but one

Post by jkinning »

I am wondering what is the best method to disable all contacts from receiving notifications except one contact? I don't want to delete the contacts or contact groups but I have a process setup where this one contact will send the notification to an internal system and then go to the appropriate group. It is more AD driven so the local contacts and contact groups should no longer be needed but that is why I don't want to delete the current local contacts and contact groups but just disable them all except one. If I could even have a method to disable all contact groups and contacts then I could just enable the one contact that would work too. I have too many to go in one by one to uncheck the Active check box so looking for more an an automated method.

Thanks!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Disable all notification contacts but one

Post by lmiltchev »

You could go to CCM > Contacts, set "Results per page = All", select all of the contacts by clicking in the "Toggle All Checkboxes" check-box, select "Deactivate" from the "With checked" drop-down menu, and click on "Go".
example01.PNG
Then, you can re-activate the one contact that you need.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Disable all notification contacts but one

Post by jkinning »

That didn't work.
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: Disable all notification contacts but one

Post by lmiltchev »

Well, if these contacts have been added to hosts/services, there is going to be a dependent relationship in place. You could use the Bulk Modifications Tool to view/remove all of the contact/contactgroup relationships in bulk.

Go to CCM > Tools > Bulk Modifications Tool > Remove Contact > Find Relationships > Check All (for Hosts and Services) > Save Changes

After you remove all of the dependent relationships, you can apply configuration.

How many issues (dependent relationships) did you see when you tried to apply configuration - just a few or tons of them? If the number is not too large, I would recommend that you remove them via the Bulk Mod Tool (from the web UI).
If the number is too large, we could give you a sql command to run to remove them directly from the db. I would rather not go this route. We usually don't recommend any "direct" mods to the db.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Disable all notification contacts but one

Post by jkinning »

I have quite a few. 37 contacts and 78 contact groups that gave me this error.

I guess I could use the bulk modification tool but I didn't want to actually remove them yet but rather just disable the account from getting notifications. In the event of any issues I could go back and check to see if they actually were a contact or part of the contact group getting notifications before moving to this new notification process.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Disable all notification contacts but one

Post by tgriep »

If you have the Enterprise feature in XI and you can use the Notification Management feature to disable the User Notifications.
Go to Admin > Notification Management menu and click on the Notification Preferences tab.

Disable the Notifications then click on the Deploy to Users Tab.
Select the users and click the Deploy Preferences button to disable the sending of email notifications to those users.

If they are contact only accounts, you would have to edit them in the Core Config Manager > Contacts menu and disable the notifications there.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Disable all notification contacts but one

Post by jkinning »

Excellent! This is what I was looking for and we do have the Enterprise version.

Thanks I'll disable that and deploy to everyone and then can just enable the contacts that should still have notifications. I'll make this change on Monday and in the afternoon report back with a status update.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Disable all notification contacts but one

Post by tgriep »

OK, let us know if you have any further questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Disable all notification contacts but one

Post by jkinning »

Well, that didn't work as the contacts within Nagios XI are still getting alerts. I tried to deactive them but I get the -
Item <contact name> cannot be disabled because it has dependent relationships.

Is there a way to force disabling these? How about the database commands?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Disable all notification contacts but one

Post by tgriep »

The only way you can disable those contacts is to remove them from the objects they are in.
You can use the Bulk Modification tool to remove the contacts from the objects they are in and then you can inactivate them.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked