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

Adding a template that has a key naming conflict results in created prototypes in the host

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 6.4.5
    • API (A), Frontend (F)
    • None

      Steps to reproduce:

      1. Register Host in Zabbix
      2. Add "Linux by Zabbix agent active" template to the host.
      3. Try to add any "DELL PowerEdge R*** by HTTP" template to host

      Result:
      Template does not get added due to a key naming conflict as described in: ZBX-23148but there are still some prototypes created in the host that come from that template.

       

      See what happened on the 2nd attempt to add the template by API with ansible:
      failed: [some.com] (item=some.other.com) => {"ansible_loop_var": "item", "changed": false, "item": "some.other.com", "msg": "connection error occurred: REST API returned

      {'code': -32602, 'message': 'Invalid params.', 'data': 'Cannot inherit item prototype with key "dell.server.net.if.get[\{#IFNAME}

      ]" of template "DELL PowerEdge R840 by HTTP" and LLD rule "Network interface discovery" to host "some.other.com",
      because an item prototype with the same key already belongs to LLD rule "Network interface discovery".'} when sending

      {"jsonrpc": "2.0", "method": "host.update", "id": "7726bea1-f565-45cc-82e3-c3438a61f651", "params":

      {"hostid": "13989", "templates": ["10220", "14382", "11146", "12114", "10048", "12557"], "templates_clear": [], "ipmi_authtype": null, "ipmi_privilege": null, "ipmi_username": null, "ipmi_password": null}

      , "auth": "388fd6c58ea0e68ebbccf0a7841720941318b069420edb457be6036888247a8c"}"}
      Expected:
      If a template can not get added to a host because of key naming conflicts, no prototypes get created on that host (that have to be manually cleaned up).

            zabbix.dev Zabbix Development Team
            che666 Rudolf Kastl
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: