Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  2. ZBXNEXT-8087

Simplify templates by removing nesting


    • Sprint 94 (Nov 2022), Sprint 95 (Dec 2022), Sprint 96 (Jan 2023), Sprint 97 (Feb 2023)
    • 10

      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.

        1. image-2022-12-14-15-22-23-901.png
          5 kB
          Janis Freibergs
        2. nested_macros.yaml
          0.8 kB
          Sergejs Maklakovs
        3. PG_FRONT_ERROR
          8.01 MB
          Artjoms Rimdjonoks
        4. PG_HOST_PROTO_3
          9.03 MB
          Artjoms Rimdjonoks
        5. screenshot-1.png
          8 kB
          Janis Freibergs
        6. screenshot-10.png
          7 kB
          Sergejs Maklakovs
        7. screenshot-11.png
          14 kB
          Sergejs Maklakovs
        8. screenshot-2.png
          55 kB
          Sergejs Maklakovs
        9. Screenshot 2023-01-17 at 16.55.00.png
          1.30 MB
          Artjoms Rimdjonoks
        10. Screenshot 2023-01-26 at 17.51.15.png
          69 kB
          Alex Kalimulin
        11. screenshot-3.png
          79 kB
          Sergejs Maklakovs
        12. screenshot-4.png
          26 kB
          Sergejs Maklakovs
        13. screenshot-5.png
          26 kB
          Sergejs Maklakovs
        14. screenshot-6.png
          67 kB
          Sergejs Maklakovs
        15. screenshot-7.png
          36 kB
          Sergejs Maklakovs
        16. screenshot-8.png
          23 kB
          Sergejs Maklakovs
        17. screenshot-9.png
          36 kB
          Sergejs Maklakovs
        18. value_map.yaml
          2 kB
          Sergejs Maklakovs
        19. WRONG_ERROR.jpg
          164 kB
          Artjoms Rimdjonoks
        20. zbx_export_templates (90).yaml
          2 kB
          Sergejs Maklakovs
        21. zbx_export_templates (91).yaml
          3 kB
          Sergejs Maklakovs

            vmaksimovs Vladimirs Maksimovs
            Kalimulin Alex Kalimulin
            Team C
            5 Vote for this issue
            55 Start watching this issue