Greetings-
What's the best way to change the alert contact for x number of services? When the site was set up this used NAGIOSADMIN and now we would like to send to a certain support group. There is several hundred entries to change hence my question.
Thanks,
Jim
Mass change to service alert contact
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Mass change to service alert contact
There's not a direct way to do this other than by having all of these services use a common template, and then changing the setting in the template. This would assume that the "notifications_enabled" setting wasn't being overridden by the individual services.
You can apply an additive template with a single config directive if you want. If that setting is specified at the host or service level it will override the template. Take a look at the following doc, there's a lot that can be done with this.
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
You can apply an additive template with a single config directive if you want. If that setting is specified at the host or service level it will override the template. Take a look at the following doc, there's a lot that can be done with this.
http://nagios.sourceforge.net/docs/3_0/ ... tance.html
-
phardstaff
- Posts: 2
- Joined: Thu Oct 20, 2011 3:31 pm
Re: Mass change to service alert contact
Hi guys, I was wanting to do the same. Took a look at the doc and have to admit I will have to read it a couple of time before it sinks in. I don't think I can do it anyway as it seems I have set this in each service as nagiosadmin which overrides the default templates ? I will get around this by changing the email address of nagiosadmin to go to a distribution list and do it like that, achieves the same result almost 
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Mass change to service alert contact
It's really best to setup contact groups and assign them to the services. Then you can always make changes to just the contact group and it will affect all the services that have that contact group.
Re: Mass change to service alert contact
scottwilkerson wrote:It's really best to setup contact groups and assign them to the services. Then you can always make changes to just the contact group and it will affect all the services that have that contact group.
We have one site with 966 configured services.
I rebuilt another site from scratch, adding the contact groups 1st and of course if works perfect. But that was only 30 hosts / 300 services... Still took me 3 days of tweaking.
Thanks for the help.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Mass change to service alert contact
There isn't currently an easy way to make mass changes like these. It would be possible to make the changes in the nagiosql database if you had a SQL guru there but I couldn't off the top of me head tell you what would all need to be changed...