[ZBX-22378] Template changes are not applied after import Created: 2023 Feb 17  Updated: 2023 Feb 24  Resolved: 2023 Feb 24

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F), Templates (T)
Affects Version/s: 6.2.6
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Denis Kot Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File RabbitMQ by HTTP Custom TAG.existing.yaml     File RabbitMQ by HTTP Custom TAG.new.yaml     File vokoscreenNG-2023-02-17_16-51-31.mp4    

 Description   

Steps to reproduce:

  1. Import 'RabbitMQ by HTTP Custom TAG.existing.yaml' Template
  2. Import 'RabbitMQ by HTTP Custom TAG.new.yaml'. Zabbix will show new Discovery rule with Prototypes to be added.
  3. Zabbix report 'Imported successfully' however new Discovery rule is not added
  4. Repeat 2-3. Everytime Zabbix will show new Discovery rule with Prototypes to be added, but will not add it.

I tested it on two different servers, both 6.2.6

Result:

On every import, Zabbix shows that new items will be added but doesn't add them. See the video. In the attachments you can find the existing template and the template with changes.

Expected:
Changes to the Template are applied and saved.

I added in the same way the existing 7 rules, but Zabbix doesn't want to add the 8th rule for some reason.



 Comments   
Comment by Denis Kot [ 2023 Feb 17 ]

The same issue is on 6.2.7

Comment by Oleksii Zagorskyi [ 2023 Feb 23 ]

I guess your templates might be exported not zabbix from frontend, as UUIDs location is bottom of the file.
So, question is how you generated them?

Both your templates use the same UUID =  b9514029d03b44de9adf24251778dbf3 which comes from official template 'RabbitMQ node by HTTP'

So, in order to try your YAML files, the official template must be removed first.

Comment by Denis Kot [ 2023 Feb 24 ]

I use our custom python script to export/import templates to be able to store them in git. It's based on this script but updated and adjusted to export to yaml.

I took the official template and adjusted it in the following way:
1. adjust the first Discovery rule as needed, with all items, triggers and graphs
2. export the template
3. copy a block of the existing Discovery rule
4. change UUIDs, keys, tags, etc. in a text editor
5. paste the changed block back
6. import template

It worked like this 6 times, but for some reason doesn't work on 7th

Comment by Oleksii Zagorskyi [ 2023 Feb 24 ]

Using custom script and those export manipulation - up to you, but resulting troubles is also up to you.
This is not official way to work with zabbix, so failures caused by that will be considered as bug.

Manipulating by UUIDs - it's a big question itself.

Issue closed as Wont Fix.

Comment by Denis Kot [ 2023 Feb 24 ]

Could you please share a 'proper' way to manipulate Templates except manually via GUI? It's not possible to 'Full clone' Discovery rule and I don't want to repeat all steps manually via GUI dozens of times.

P.S. sorry, but your answer sounds like "Сам дурак"

Generated at Fri Apr 18 07:22:38 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.