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

Server links template to host if the host and the template have item prototypes with same key on different LLDs

XMLWordPrintable

    • Sprint candidates, S24-W10/11, S24-W12/13
    • 1.5

      Problem description: Let's imagine that Network discovery or Autoregistration created a host and linked it to a template that has an LLD with an item prototype. Then, the user unlinks the template and modifies the LLD key (for whatever reasons). In this case, network discovery (and also autoregistration, if the host metadata was changed) will attempt to link the host to the template again, and will succeed. As result of this linkage, the LLD from the template will be copied to the host, but without the item prototype (and without all the trigger and graph prototypes that depend on it).

      Such behavior differs from the behavior, observed when performing such linkage manually - in this case an error is returned and linkage is not performed. It is expected that the same behavior would be observed also when zabbix server performs the linkage (autoregistration, network discovery, LLD).

       

      Steps to reproduce:

      1. Create a template with an LLD, an item prototype and a trigger prototype that uses the item prototype in its expression
      2. Create a network discovery action that would create a host and link it to this template
      3. Discover a host using the above mentioned discovery action
      4. Unlink the host from the template
      5. Modify the Key of the LLD on the discovered host
      6. Wait for network discovery to link the template back to the host
      7. Check the list of LLDs on the host

      Result:
      The LLD from the template was copied to the host but without the item and trigger prototypes, because the host already had an item prototype with such key
      Expected:
      Same as observed in case when the linkage is done manually from frontend, the template should not have been linked to the host and an error should have been returned in zabbix server log.

            dgoloscapov Dmitrijs Goloscapovs
            solonkins Sergejs Olonkins
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: