Skip to main content

Hi,

 

new user here. We have deployed a centreon server only a couple of days ago and I’m trying to figure out if it covers all our needs.

In particular I was tinkering with templates but seems that doesn’t work as I was expecting. I’ve created a host template with all the basic settings we need: notifications, services templates, scheduling…
Now when I try to create a new host and assing this template to it, new host is inheriting only services and icon, no other fields are copied from the template.

Is that supposed to work like this or I’m missing something? 
Thanks in advance for your attention

Alessio

Have you deployed the configuration? https://docs.centreon.com/cloud/monitoring/monitoring-servers/deploying-a-configuration/

 


Hello

for my setup I had to do something similar, I have multiple clients with differents setting (for notification, or snmp community, or nsclient password)

what I did was 2 things

  • create a “host template” with no service template linked, with all the settings I needed, 1 for each client
  • modifiy the “generic-active-host-custom” to have all these setting unconfigured

 

next all my host have their 1rst template as “client_xxx”,it is important for it to be first

the 2nd tempate is the function template (linux, windows, specific custom host template) then the additionnal template if needed

 

the “icon” comes mostly from the 2nd template, as it is the relevant one

 

what you need to understand is the “inheritance”, the order of the template is important, and if a template has some settings that overwrite the same setting from another template, the last one applied win

 

that “generic active host custom” is the root of all the template used by centreon, so by inheritance that template is always used, that’s why I set all its values to “default” or empty values

 

an old centreon doc here Object Inheritance — Centreon Engine 19.10 documentation but the concept is still the same

 

 

 

 


Hi, thanks for the answers.

@rchauvel  yes, I’ve exported the configuration.

@christophe.niel-ACT well I think that I’ve used the parent-child inheritance in my case. I made the Windows_server_snmp_template and in this template I’ve used the “os-windows-snmp” default template template.
I’ve only a doubt: what is the expected behaviour? As soon as I select the template, the other fileds will be automatically populated? Or they all remains blank to indicate that is the template to domain over them?


you won’t see the inheritance/precedence in the web ui in the configuration pages, so the expected behaviour is the fields stay empty 

the only thing that is dynamically changing are the “Macros” but not the other option (notification, contact, period, etc)

they are computed/flattened when you push the configuration on your poller

 


you won’t see the inheritance/precedence in the web ui in the configuration pages, so the expected behaviour is the fields stay empty 

the only thing that is dynamically changing are the “Macros” but not the other option (notification, contact, period, etc)

they are computed/flattened when you push the configuration on your poller

 

Oh… I’m feeling dumb for not having though about it before. I was expecting some kind of feedback from the ui upon template loading.

Is there any other way to be sure that those “hidden” parameters are rellay appied to my host except simulating a warning? Because at this point, I think that all is working as expected


Reply