Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25308

Zabbix server updates a tag instead of removing the old tag and adding a new one during tag update

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 6.0.35rc1, 6.4.20rc1, 7.0.5rc1, 7.2.0alpha1
    • Server (S)

      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:

      1. Create two hosts: "test" and "test2"
      2. Add the following entities to each host:
        1. LLD with key = "trap"
        2. Item prototype with key "key{#MACRO}" and tag = "tag => value"
      3. Create a template and add the following entities to it:
        1. LLD with key = "trap"
        2. Item prototype with key "key{#MACRO}" and tag = "new tag => new value"
      4. Link The template to host "test2"
      5. 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).
      6. Create an auto-registration action that would create a host "test" and link it to the previously created template
      7. Stop Zabbix agent
      8. Open agent configuration file and change HostMetadata parameter
      9. Start Zabbix agent
      10. 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.

            zabbix.dev Zabbix Development Team
            solonkins Sergejs Olonkins
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: