-
Problem report
-
Resolution: Unresolved
-
Major
-
None
-
6.4.17
-
Support backlog
Steps to reproduce:
- Create a Template
- Create Master item
- Create Dependent Items/Calculated Items
- Export Template as YAML
- Import Template
Result:
It update Dependent Items/Calculated on Template, even any item be changed
It is possible to check with importcompare api method before import it.
During yaml import process with dependent/calculated item, zabbix didnt identify these fields on system:
"delay": "0",
"trends": "0"
This kind of situation occour:
{ "before": { "uuid": "7a24aadf16694e098c8087035f48e564", "name": "ZBC - Templates Replace Control", "type": "CALCULATED", "key": "zbc_control[templates_replace]", "delay": "5m", "history": "12h", "value_type": "TEXT", "params": "last(//zbc_data_processed)", "preprocessing": [ { "type": "JSONPATH", "parameters": [ "$..template_replace_list.first()" ] } ], "tags": [ { "tag": "PROCESS", "value": "ZBC" } ] }, "after": { "uuid": "7a24aadf16694e098c8087035f48e564", "name": "ZBC - Templates Replace Control", "type": "CALCULATED", "key": "zbc_control[templates_replace]", "delay": "5m", "history": "12h", "value_type": "TEXT", "params": "last(//zbc_data_processed)", "preprocessing": [ { "type": "JSONPATH", "parameters": [ "$..template_replace_list.first()" ] } ], "tags": [ { "tag": "PROCESS", "value": "ZBC" } ], "trends": "0" } },
It occour as long it is not possible to define trends for Calculated:
As result, every Dependent/Calculated Item is updated again.
Due documentation xml_export_import/templates , it is not supposed to occour as long import is supposed to map and update only uuid changed and ignore unchanged uuid
Mapped issue occour with fields not allowed to be changed on frontend as long Dependent Item and Calculated have different behavior than a regular item
Expected:
If you execute same steps, but instead export as YAML, export as XML, everything works fine as long only changed item is identified as "updated"