Template versioning is a long-requested feature (ZBXNEXT-1111) that can accommodate quite a few use cases. It also paves the way for future features, such as automatic template updates. However, versioning is only usable if one doesn't use any nested templates. Otherwise, one would need not only to track a template's version but rather also all versions of all child templates, which, in turn, would inevitably raise the question about some dependency management system within templates. I'm not sure if we want to go down this route.
But without dependency management versioning of templates that are linked to other templates could do more harm than good because it would create a false sense of security and introduce a great deal of confusion because two identical templates of the same version can behave differently.
Starting from 6.0 Zabbix already ships all standard templates flattened (i.e. without any nesting) so every standard template is already self-contained. It's proposed to move one step further and remove the ability to create nested templates altogether. This gives the following advantages:
- Straightforward and simple versioning, as mentioned above
- Simpler server-side and frontend code (less code is fewer problems and easier maintenance)
- Simpler user interface
- Better performance
One apparent disadvantage is that we have to sacrifice maintainability of custom templates in some sense. If one has a large fleet of devices or hosts that share many common items it's time-consuming and impractical to maintain such setups without any nesting. However, this can be solved by good tooling that can merge one template into others in bulk. Such tooling must be accessible from Zabbix UI.
Are there any other use cases or workflows where the template nesting is important? Please feel free to comment.