I re-read your posting and I, too, can find nothing that was not answered.
Would you be willing to restate your question in new words?
Group Template & Host Groups
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Group Template & Host Groups
Yes, please do, we'd like to help clear up any questions you may have. Thanks!
Re: Group Template & Host Groups
guys,
i am not saying you did not answered my question and appreciate your help and support with regard, though i just wanted to make sure i am doing the right thing when configuring host groups, host templates & hosts, if enforcing template on host group does not work OK though just want to verify if the proper way of administrating multiple hosts within host group is to add one host template to each host and then within the template it self add another template and make the changes within, it is a bit cumbersome and i was not sure that this is the way it was meant to be.
just want to get your impression and best practice for host groups host template enforcement as i already understand can`t be enforced to host groups.
hope that clarify my intentions,
itzik vilmovsky
i am not saying you did not answered my question and appreciate your help and support with regard, though i just wanted to make sure i am doing the right thing when configuring host groups, host templates & hosts, if enforcing template on host group does not work OK though just want to verify if the proper way of administrating multiple hosts within host group is to add one host template to each host and then within the template it self add another template and make the changes within, it is a bit cumbersome and i was not sure that this is the way it was meant to be.
just want to get your impression and best practice for host groups host template enforcement as i already understand can`t be enforced to host groups.
hope that clarify my intentions,
itzik vilmovsky
Re: Group Template & Host Groups
The easiest way to do this is to use multiple templates. Let's say you have windows machines and linux machines that you're monitoring. And you have two kinds of linux machines: web servers and database servers. So here's what I would do:
Create the following templates as follows:
Then assign db-server, web-server, or windows-server to your hosts. Even if db-server and web-server are the same definition, you can easily go back and alter individual aspects later. This lets you base templates on templates on templates, so if you plan your structure ahead of time, you can more easily change things in the future. Note that hostgroups are not even mentioned here.
To actually SET the hosts to the templates in the first place, you will need to do something either with editor magic (vim macros, maybe) or sed or something to change your existing hosts.
Create the following templates as follows:
Code: Select all
generic-server
linux-server (inherit generic-server and override whatever you need)
web-server (inherit linux-server and override whatever you need)
db-server (inherit linux-server and override whatever you need)
windows-server (inherit generic-server and override whatever you need)
To actually SET the hosts to the templates in the first place, you will need to do something either with editor magic (vim macros, maybe) or sed or something to change your existing hosts.
Re: Group Template & Host Groups
This kind of speaks to the original issue - at some point you will have to do a bit of manual work to make the changes en masse. Whether it is scripted or done manually is up to you.eloyd wrote:To actually SET the hosts to the templates in the first place, you will need to do something either with editor magic (vim macros, maybe) or sed or something to change your existing hosts.
Former Nagios employee