Details

    • Team:
      Team D
    • Sprint:
      Sprint 56 (Sep 2019), Sprint 55 (Aug 2019), Sprint 52 (May 2019), Sprint 53 (Jun 2019), Sprint 54 (Jul 2019), Sprint 57 (Oct 2019)
    • Story Points:
      7

      Description

      Summary

      Current implementation of XML import requires existence of all XML attributes even if an attribute supposed to be empty or not relevant. It makes templates in XML format heavy and hardly readable.

      Proposed changes will enable producing of small and simple export files by having only very limited number of mandatory attributes.

      Zabbix Acceptance

      All host and template XML attributes must be reviewed:

      1. We must limit number of mandatory attributes to absolute minimum
        1. For example, in case of items: name, key
      2. Non-mandatory attributes must have safe default values:
        1. Default values must match defaults from UI whenever possible
          1. If a default value is not good for some reason, it must be adjusted also in UI, API and database schema
        2. For example, some defaults for items: item type: Zabbix agent; value type: Unsigned; delay: 1m (should be modified); status: Enabled
      3. All numeric constants must get appropriate human readable non-translatable alternatives, no numeric constants will be supported anymore
        1. Human readable strings should be as close to as possible to constants already used in Zabbix code, case sensitive. Some constants should be renamed in Zabbix code to make them easier to understand.
          1. For example, item type: "SNMPv1", value type: "FLOAT"
      1. API calls
        1. configuration.import will be updated to support new logic (new defaults, human readable constants, new set of mandatory fields) 
        2. configuration.export must not export non-relevant attributes or attributes having default values
          1. Values must be in human readable form whenever possible
      2. When importing an existing host or template, Zabbix will also overwrite missing attributes taking into account default values
      3. All exported objects must be ordered by sort fields first and then mandatory fields
        1. Sort fields for all objects must be reviewed, for example:
          1. Item: name + key
          2. Trigger: name + expression

      A few examples

      Item definition in XML

      <item>
      <name>Modification time of /etc/passwd</name>
      <key>vfs.file.time[/etc/passwd]</key>
      <type>ZABBIX_ACTIVE</type>
      </item> 

      Trigger definition in XML

      <trigger>
      <name>Some problem</name>
      <expression>{Template:vfs.file.time[/etc/passwd].fuzzytime(1h)}=1</expression>
      <priority>HIGH</priority>
      </trigger>

      Business Use Cases

      1. I want to have simple human readable templates in XML format

      Decisions made

      1. Existing attribute names will not be changed

        Attachments

        1. http_export.gif
          http_export.gif
          10.76 MB
        2. Selection_564.png
          Selection_564.png
          18 kB
        3. Selection_566.png
          Selection_566.png
          23 kB
        4. Selection_567.png
          Selection_567.png
          66 kB
        5. Selection_569.png
          Selection_569.png
          82 kB
        6. Selection_571.png
          Selection_571.png
          69 kB
        7. zbx_export_hosts (18).xml
          5 kB
        8. zbx_export_hosts (35).xml
          0.7 kB
        9. zbx_export_hosts (80).xml
          1 kB
        10. zbx_export_hosts from 4.2 (3).xml
          198 kB
        11. zbx_export_templates (1).xml
          13 kB
        12. zbx_export_templates (29).xml
          1 kB
        13. zbx_export_templates (3).xml
          187 kB
        14. zbx_export_templates (4).xml
          0.9 kB
        15. zbx_export_templates (7).xml
          1 kB
        16. zbx_export_templates (70).xml
          1 kB
        17. zbx_export_templates (71).xml
          1 kB

          Issue Links

            Activity

              People

              • Assignee:
                martins-v Martins Valkovskis
                Reporter:
                palivoda Rostislav Palivoda
              • Votes:
                1 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: