Hi all.
we need to change the template on a high number of service.
What is the correct way to make the change?
Thanks,
massive change of template on service
Re: massive change of template on service
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.
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.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: massive change of template on service
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,
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
When using reconfigure_nagios.sh, were your cfg files valid?
Try doing it inside the directory.
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?
Try doing it inside the directory.
Code: Select all
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.shWere there any errors when doing so?