-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
6.4.5
-
None
Steps to reproduce:
- Register Host in Zabbix
- Add "Linux by Zabbix agent active" template to the host.
- 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
]" 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).