Add contact group to multiple hosts at once
-
lane777smith
- Posts: 2
- Joined: Fri Apr 27, 2012 10:24 am
Add contact group to multiple hosts at once
I'm running Nagios XI. Is there a way to add a Contact Group to the Notification Setting on multiple Host and Service checks at the same time? I need to add a group to about 30 different checks and having to manual edit each check is a bit unwanted. 
Re: Add contact group to multiple hosts at once
I'm interested in this, but in reverse. I need to change the contact group that is assigned to a number of hosts and services on a total of about 4000 items.
Please tell us that there is an option for bulk updating contact groups! I would think it would be similar to the bulk contact update wizard in the CCM beta...??
Please tell us that there is an option for bulk updating contact groups! I would think it would be similar to the bulk contact update wizard in the CCM beta...??
Re: Add contact group to multiple hosts at once
I can put the bulk modification for contact groups on the TODO list for the new CCM, but my guess would be that it'll be a little bit before I could have that ready since I've got a few other projects I need to finish first.
For the contact group remove for about 4000 items, you could run an SQL query (at your own risk) and just blanket remove all service -> contactgroup relationships.
This will clear ALL service->contactgroup relationships, but it will leave template relationships intact. Let me restate, do this AT YOUR OWN RISK 
This can work for hosts as well if needed.
For the contact group remove for about 4000 items, you could run an SQL query (at your own risk) and just blanket remove all service -> contactgroup relationships.
Code: Select all
mysql -pnagiosxi nagiosql
DELETE FROM tbl_lnkServiceToContactgroup;This can work for hosts as well if needed.
Code: Select all
DELETE FROM tbl_lnkHostToContactgroup;Re: Add contact group to multiple hosts at once
@lane777smith, this feature is built in to the new CCM that is currently in beta. I can send you the link if you're interested in trying it out. Otherwise, the other way to manage this is with the use of templates, and as far as maintenance goes, that's probably the best long-term solution.
-
lane777smith
- Posts: 2
- Joined: Fri Apr 27, 2012 10:24 am
Re: Add contact group to multiple hosts at once
mguthrie, A link would be great. I'll look into the templates as well. Thanks.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact: