Page 1 of 1
massive change of template on service
Posted: Wed Oct 25, 2017 7:09 am
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,
Re: massive change of template on service
Posted: Wed Oct 25, 2017 8:01 am
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.
Re: massive change of template on service
Posted: Wed Oct 25, 2017 11:50 am
by dwasswa
Thanks
@eloyd,
@ Francesco,have you tried what
@eloyd suggested?
Re: massive change of template on service
Posted: Thu Oct 26, 2017 3:50 am
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,
Re: massive change of template on service
Posted: Thu Oct 26, 2017 4:40 pm
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?