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

Frontend displays SQL error when linked template have item prototype with equal key as host item

    XMLWordPrintable

    Details

    • Team:
      Team B
    • Sprint:
      Sprint 48, Jan 2019, Sprint 49 (Feb 2019)
    • Story Points:
      0.125

      Description

      Steps to reproduce:

      1. Create a template with discovery rule and item prototype
      2. Create a host with item. Use same item key as for item prototype.
      3. 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.

        Attachments

          Activity

            People

            Assignee:
            sasha Alexander Vladishev
            Reporter:
            Miks.Kronkalns Miks Kronkalns
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: