we are using host templates as follows (SAP as an example for multihost systems):
- service template (might contain default values/thresholds for a service)
- generic SAP template: contains services and thresholds for all systems of that type (here: SAP systems), imports the service template
- system specific template (e.g. system ABC): might contain services and thresholds for this specific system (and all nodes belonging to that system). It imports the generic SAP template to get the defaults, if we don’t need specific values here.
But this is not working as expected. Because the private template imports the generic one, all values set in the private template are overwritten with the generic values, so the private template can not be used to change defaults, which have been set somewhere up in the tree. The only working option is to set the private values on host level, but this must be done on each host belonging to the system seperately.
Variable values will get effective as follows:
- Service template: values set here are effective, if nowhere else set (default value)
- generic SAP template: value is effective, if not set on host level (default value from service template can be overwritten here)
- SAP private template for system ABC: any value set here is ignored (overwritten by values of “generic SAP template”, regardless if that value was explicitly set there or inherited by service template)
- host level: value set here are effective always (overwriting all previous settings)
I understand, that the issue is caused by importing the generic template from private template. But is this really how it should work? Shouldn’t a template lower in the tree be able to overwrite previously set variables?
Is there another way to achieve what we intended to do? (We don’t want to create host groups for each SAP system…).
Thanks a lot.
Some system information:
icinga2 - The Icinga 2 network monitoring daemon (version: 2.13.1-1)
Platform: Red Hat Enterprise Linux Server
Platform version: 7.6 (Maipo)
Kernel version: 3.10.0-957.12.1.el7.x86_64
Compiler: GNU 4.8.5
Build host: runner-hh8q3bz2-project-507-concurrent-0
OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
Enabled features: api checker ido-mysql influxdb mainlog notification
Icinga Web 2 Version
Git commit date