Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-23568

Validating items fields during import.

XMLWordPrintable

    • Sprint 105 (Oct 2023), Sprint 106 (Nov 2023), Sprint 107 (Dec 2023)
    • 2

      Steps to reproduce:
      If you have some old hosts and template from the past 3.0 4.0 5.0 version with some wrong parameters in DB.
      When you export them they produce garbage in the export without proper validation.
      As final they cannot be imported at all.

      Result:
      Here is example of exported template

      zabbix_export:
        version: '6.4'
        template_groups:
          - uuid: 7df96b18c230490a9a0a9e2307226338
            name: Templates
        templates:
          - uuid: a8a2e726eed744329bfdf2059121dda0
            template: 'Simple Host'
            name: 'Simple Host'
            groups:
              - name: Templates
            items:
              - uuid: a32327ee078b484b918ba84d774267f5
                name: icmpping
                type: SIMPLE
                key: icmpping
                delay: 30s
                history: 1w
                allowed_hosts: localhost
                request_method: POST
                tags:
                  - tag: Application
                    value: 'Simple check'
                triggers:
                  - uuid: 9faadec8d92c4b20ab38561a7777bcad
                    expression: 'last(/Simple Host/icmpping)<1 and sum(/Simple Host/icmpping,#6)<1'
                    name: 'Ping Check'
                    priority: DISASTER
                    description: 'Alerts when at least one reply is received over the last 6 ping request measurements.'
              - uuid: f0980646622d4bbc98d77cfbe5eb6723
                name: packetloss
                type: SIMPLE
                key: icmppingloss
                delay: 30s
                units: '%'
                request_method: POST
                tags:
                  - tag: Application
                    value: 'Simple check'
        graphs:
          - uuid: 3dfedc7f92534a16aa77d6080ff9ce08
            name: 'Ping response time'
            graph_items:
              - color: FFFF33
                item:
                  host: 'Simple Host'
                  key: icmpping
      
      

      Here is strange item which has many types at the same time.

              - uuid: a32327ee078b484b918ba84d774267f5
                name: icmpping
                type: SIMPLE
                key: icmpping
                delay: 30s
                history: 1w
                allowed_hosts: localhost
                request_method: POST
      

            jfreibergs Janis Freibergs
            neogan Andrei Gushchin (Inactive)
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: