Page 1 of 2

Disable all notification contacts but one

Posted: Fri May 11, 2018 6:28 am
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!

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 9:59 am
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.

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 12:44 pm
by jkinning
That didn't work.

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 1:24 pm
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.

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 1:32 pm
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.

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 2:16 pm
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.

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 2:25 pm
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.

Re: Disable all notification contacts but one

Posted: Fri May 11, 2018 2:36 pm
by tgriep
OK, let us know if you have any further questions.

Re: Disable all notification contacts but one

Posted: Mon May 14, 2018 9:26 am
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?

Re: Disable all notification contacts but one

Posted: Mon May 14, 2018 10:06 am
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.