[ZBX-13281] Item prototype missed in exported .xml Created: 2018 Jan 02  Updated: 2018 Jan 02  Resolved: 2018 Jan 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 3.4.5
Fix Version/s: None

Type: Problem report Priority: Minor
Reporter: Yaroslav Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: Export, Template, xml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File discovery-rules.png     XML File example-exported.xml     PNG File item-prototypes.png    
Issue Links:
Duplicate
duplicates ZBXNEXT-1305 Template with Linked Template (both w... Open

 Description   

If you add the new item prototype into discovery rule, which linked from another template (template module), then when you export template to .xml, this prototype will be lost. Please look at screenshots for reproduce.



 Comments   
Comment by Ingus Vilnis [ 2018 Jan 02 ]

Yes, that happens because the item prototype is created in a template where the parent LLD rule is coming from another template. The templateid field for this item is NULL thus it can not be exported.

MariaDB [zabbix]> select itemid, type, hostid, name, key_, delay, templateid  from items where itemid in (27872,27875,28791);
+--------+------+--------+------------------------------------------------+--------------------------------------+-------+------------+
| itemid | type | hostid | name                                           | key_                                 | delay | templateid |
+--------+------+--------+------------------------------------------------+--------------------------------------+-------+------------+
|  27872 |    4 |  10233 | Network Interfaces Discovery                   | net.if.discovery                     | 3600  |      27098 |
|  27875 |    4 |  10233 | Interface {#IFNAME}({#IFALIAS}): Bits received | net.if.in[ifHCInOctets.{#SNMPINDEX}] | 180   |      27104 |
|  28791 |    0 |  10233 | EXAMPLE                                        | EXAMPLE                              | 30s   |       NULL |
+--------+------+--------+------------------------------------------------+--------------------------------------+-------+------------+
3 rows in set (0.00 sec)

The item in such configuration will be operational and also you can create triggers for items originating from another rules but by current design it can not be exported via XML.

Comment by richlv [ 2018 Jan 02 ]

duplicate of ZBXNEXT-1305

ingus.vilnis: Thanks, could not find the original one. Linked now.

Comment by Ingus Vilnis [ 2018 Jan 02 ]

Closing as duplicate of ZBXNEXT-1305.

Comment by Yaroslav [ 2018 Jan 02 ]

OK, thx. I'll watch for the ZBXNEXT-1305

Generated at Sat Apr 20 18:15:25 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.