-
Problem report
-
Resolution: Won't fix
-
Trivial
-
None
-
6.0.35rc1, 6.4.20rc1, 7.0.5rc1, 7.2.0alpha1
Problem description:
When an item prototype tag is updated, in reality it should mean that the old tag is deleted and the new tag is added, like it is currently done by frontend. When an item prototype tag is updated by server (auto-registration), it actually performs an update operation, as can be seen in examples below:
Frontend:
itemprototype.tags[40547]: Deleted itemprototype.tags[40553]: Added itemprototype.tags[40553].itemtagid: 40553 itemprototype.tags[40553].tag: new tag itemprototype.tags[40553].value: new value
Server:
itemprototype.tag[40546]: Updated itemprototype.tag[40546].tag: tag => new tag itemprototype.tag[40546].value: value => new value
Please apply the same approach as done by frontend (removing tag and adding new one) when updating item prototype tags by Server
Steps to reproduce:
- Create two hosts: "test" and "test2"
- Add the following entities to each host:
- LLD with key = "trap"
- Item prototype with key "key{#MACRO}" and tag = "tag => value"
- Create a template and add the following entities to it:
- LLD with key = "trap"
- Item prototype with key "key{#MACRO}" and tag = "new tag => new value"
- Link The template to host "test2"
- Check the Details of the corresponding Audit log record for updating the item prototype on host test2 - the update of the tag is performed as deletion of the old tag and creation of a new one (see example above).
- Create an auto-registration action that would create a host "test" and link it to the previously created template
- Stop Zabbix agent
- Open agent configuration file and change HostMetadata parameter
- Start Zabbix agent
- Check that the template is linked to host "test"
Check the Details of the corresponding Audit log record for updating the item prototype on host test
Result: in Audit log it can be seen that the server has actually updated the existing tag (see example above).
Expected: same as frontend, server should delete the old tag and add a new one when updating tags.