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

If the trigger description field contains a "line break" and a "-", the exported YAML format is incorrect.

XMLWordPrintable

    • S24-W26/27, S24-W50/51/52
    • 1

      This does not occur in XML, only in YAML format.
      Occurred on 6.0.23 and 6.0.31.
      This issue occurred with customers on 6.0.27 and 6.0.28.

      Steps to reproduce:

      1. Duplicate the ICMP Ping template and leave only the following.
        • Item : ICMP ping
        • Trigger : Unavailable by ICMP ping
      2. Delete the trigger tag, add a line break and add - in the description field. (It will not be reproduced if you just put - at the end without line break)
      3. Delete all template macros
      4. Export the settings of the duplicated template in YAML format
      5. Delete the duplicated template
      6. Import the configuration file (YAML)

      Result:
      The following error is output

      Details Import failed
      Invalid tag "/zabbix_export/templates/template(1)/items/item(2)": unexpected tag "mappings". [zabbix.php:22 → require_once() → ZBase->run() → ZBase->processRequest() → CController->run() → CControllerPopupImportCompare->doAction() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->importcompare() → CXmlValidator->validate() → C60XmlValidator->validate() → CXmlValidatorGeneral->doValidate() → CXmlValidatorGeneral->doValidateRecursive() → CXmlValidatorGeneral->doValidateRecursive() → CXmlValidatorGeneral->doValidateRecursive() → CXmlValidatorGeneral->doValidateRecursive() → CXmlValidatorGeneral->doValidateRecursive() in include/classes/import/validators/CXmlValidatorGeneral.php:234]
      

      Expected:
      Imported successfully


      YAML output result

      ...
      triggers:
      - uuid: 01afbfccdf624240bfe6deef1c6f3791
        expression: 'max(/ICMP Ping_temp1/icmpping,#3)=0'
        name: 'Unavailable by ICMP ping'
        status: DISABLED
        priority: HIGH
        description: |
          Last three attempts returned timeout.  Please check device connectivity.
          - valuemaps:
      - uuid: 2af9a2d53eec46d7b1a35f39685cdaed
      ...
      

      Exported output with “-” changed to “test”

      ...
      triggers:
      - uuid: 01afbfccdf624240bfe6deef1c6f3791
        expression: 'max(/ICMP Ping_temp1/icmpping,#3)=0'
        name: 'Unavailable by ICMP ping'
        status: DISABLED
        priority: HIGH
        description: |
          Last three attempts returned timeout.  Please check device connectivity.
          test
      valuemaps:
      - uuid: 2af9a2d53eec46d7b1a35f39685cdaee
      ...
      

        1. broken_export.json
          1 kB
        2. screenshot-1.png
          screenshot-1.png
          14 kB
        3. screenshot-2.png
          screenshot-2.png
          8 kB

            gcalenko Gregory Chalenko
            ikarimata Itsuki Karimata
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 4h
                4h