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:
- Duplicate the ICMP Ping template and leave only the following.
- Item : ICMP ping
- Trigger : Unavailable by ICMP ping
- 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)
- Delete all template macros
- Export the settings of the duplicated template in YAML format
- Delete the duplicated template
- 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 ...
- caused by
-
ZBXNEXT-8078 Remove unnecessary new line for each element in array for export .yaml templates
- Closed