Mass change to service alert contact

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
HuskyIMS
Posts: 2
Joined: Wed Jul 20, 2011 1:17 pm

Mass change to service alert contact

Post by HuskyIMS »

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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Mass change to service alert contact

Post by scottwilkerson »

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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
phardstaff
Posts: 2
Joined: Thu Oct 20, 2011 3:31 pm

Re: Mass change to service alert contact

Post by phardstaff »

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

Post by scottwilkerson »

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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
HuskyIMS
Posts: 2
Joined: Wed Jul 20, 2011 1:17 pm

Re: Mass change to service alert contact

Post by HuskyIMS »

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. :) What would be the best way to divide that into different contact groups?

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

Post by scottwilkerson »

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...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked