-
Problem report
-
Resolution: Fixed
-
Minor
-
4.0.3, 4.2.0alpha3
-
Sprint 48, Jan 2019, Sprint 49 (Feb 2019)
-
0.125
Steps to reproduce:
- Create a template with discovery rule and item prototype
- Create a host with item. Use same item key as for item prototype.
- Try to link a template to host.
Result:
Error message
Error in query [INSERT INTO items (type,snmp_community,snmp_oid,hostid,name,description,key_,master_itemid,delay,history,trends,status,value_type,trapper_hosts,units,snmpv3_contextname,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,formula,logtimefmt,valuemapid,params,ipmi_sensor,authtype,username,password,publickey,privatekey,flags,port,inventory_link,lifetime,jmx_endpoint,templateid,interfaceid,itemid) VALUES ('0','','','10296','a','','a',NULL,'30s','90d','365d','0','3','','','','','0','0','','0','','','',NULL,'','','0','','','','','2','','0','30d','','29474','37','29477')] [Duplicate entry '10296-a' for key 'items_1'] SQL statement execution has failed "INSERT INTO items (type,snmp_community,snmp_oid,hostid,name,description,key_,master_itemid,delay,history,trends,status,value_type,trapper_hosts,units,snmpv3_contextname,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authprotocol,snmpv3_authpassphrase,snmpv3_privprotocol,snmpv3_privpassphrase,formula,logtimefmt,valuemapid,params,ipmi_sensor,authtype,username,password,publickey,privatekey,flags,port,inventory_link,lifetime,jmx_endpoint,templateid,interfaceid,itemid) VALUES ('0','','','10296','a','','a',NULL,'30s','90d','365d','0','3','','','','','0','0','','0','','','',NULL,'','','0','','','','','2','','0','30d','','29474','37','29477')".
Expected:
In previous versions there was nice error message:
Item with key "a" already exists on "test host" as an item.