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

LLD updates tags of already discovered items each time the LLD is executed

    XMLWordPrintable

Details

    • Team A
    • Sprint 90 (Jul 2022)
    • 0.5

    Description

      The most convenient way to observe the problem is to execute the "Zabbix stats cluster" item that belongs to the "Zabbix server health" template and check update records for item_tag table in zabbix_server.log (in debug mode). This item triggers the "High availability cluster node discovery" LLD, that in its turn discovers and then checks the following items:
      "Cluster node []: Address"
      "Cluster node []: Last access age"
      "Cluster node []: Las access time"

      As result, each time a value is returned for the master item ("Zabbix stats cluster"), item tags of the corresponding discovered items are updated:

      101824:20220601:150516.096 query [txnlev:1] [select null from hosts where hostid=10084 for update]
      101824:20220601:150516.097 End of DBlock_record():SUCCEED
      101824:20220601:150516.097 query [txnlev:1] [update item_tag set tag='node-id',value='cl3tykf3k0001qm7puazcmw9w' where itemtagid=33643;
      update item_tag set tag='node-name',value='' where itemtagid=33644;
      update item_tag set tag='component',value='cluster' where itemtagid=33645;
      update item_tag set tag='node-id',value='cl3tykf3k0001qm7puazcmw9w' where itemtagid=33646;
      update item_tag set tag='node-name',value='' where itemtagid=33647;
      update item_tag set tag='component',value='cluster' where itemtagid=33648;
      update item_tag set tag='node-id',value='cl3tykf3k0001qm7puazcmw9w' where itemtagid=33649;
      update item_tag set tag='component',value='cluster' where itemtagid=33651;
      update item_tag set tag='node-id',value='cl3tykf3k0001qm7puazcmw9w' where itemtagid=33652;
      update item_tag set tag='node-name',value='' where itemtagid=33653;
      ]
      101824:20220601:150516.098 End of lld_items_tags_save() added:0 updated:10 removed:0
      

      Currently this is not a big problem, but once ZBXNEXT-7554 gets merged, this will add multiple useless records in the changelog table.

      Steps to reproduce:

      1. Open the default zabbix installation
      2. Open the list of items of Zabbix server host
      3. Execute item "Zabbix stats cluster"
      4. Make sure that "Cluster node ..." items are discovered
      5. Execute the master item again
      6. Check Zabbix server log (DebugLevel = 4)

      Result: each time the master item is triggered, discovered item tags are updated
      Expected: discovered item tags should be updated only when something is actually changed.

      Server log: zabbix_server.log

      Attachments

        Issue Links

          Activity

            People

              wiper Andris Zeila
              solonkins Sergejs Olonkins
              Votes:
              4 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: