massive change of template on service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Francesco
Posts: 124
Joined: Wed Oct 28, 2015 5:02 am
Location: /usr
Contact:

massive change of template on service

Post by Francesco »

Hi all.
we need to change the template on a high number of service.

What is the correct way to make the change?

Thanks,
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: massive change of template on service

Post by eloyd »

If it's a single template that is inherited by a large number of services, then you go to the Core Configuration Manager, select Service Templates, and then edit the appropriate parameters.

If, and this is what I think you mean, you have a lot of services, each with different templates, and you want to change a lot of templates, then you can do the above step for each one, or you can use the bulk modification tools that are part of the Enterprise add-on. However, it may not be what you want. Nagios XI Enterprise add-on provides the ability to make sweeping changes to many configuration parameters within Nagios XI, but unfortunately, one of them is not the ability to be able to make multiple changes to many service templates. You still have to edit the templates separately.

However, you may be able to make a new template that has the appropriate changes that you want, and then use the bulk modification tool to add that template to all of the services that you need, and use that new template to override the incorrect settings from the other templates.

It can get complicated.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
dwasswa

Re: massive change of template on service

Post by dwasswa »

Thanks @eloyd,

@ Francesco,have you tried what @eloyd suggested?
User avatar
Francesco
Posts: 124
Joined: Wed Oct 28, 2015 5:02 am
Location: /usr
Contact:

Re: massive change of template on service

Post by Francesco »

Thanks @eloyd, but I can not change the parameters in the template because is used by other service that I must keep untouched.

The ccm Tool "Bulk Modifications" that I have installed, v1.2.3, not allow to change the template parameters.

I found this article:
https://support.nagios.com/kb/article.php?id=165
but putting the modified .cfg file in the "import" subfolder, and executing "reconfigure_nagios.sh", does not work.

It works the flow "prep tool" --> folder "cfgprep" --> web import

There is a better way?

A note: I prefer a procedure full web, or full command line, not a mixed one.

Thanks,
kyang

Re: massive change of template on service

Post by kyang »

When using reconfigure_nagios.sh, were your cfg files valid?

Try doing it inside the directory.

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Can you post the cfg file you want to import to do a mass change on a service? You can take out things that are sensitive if needed.

Were there any errors when doing so?
Locked