Ad Widget

Collapse

Adding new item gives duplicate key error - Zabbix 1.6.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • garyalexza
    Junior Member
    • Jul 2009
    • 2

    #1

    Adding new item gives duplicate key error - Zabbix 1.6.4

    Hi There

    Having an issue which I think is database related. When trying to add a new item it gives an error inserting that new item because of a duplicate key. The key is itemid in the items table, when I look up that item in the table via mysql client it is a valid item. There are also about 100 items added after that item.

    Any ideas what to check here ?
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    Isn't that zabbix key already existent for that specific host?
    Does that key belong to a Templated item attached to the host?

    Zabbix won't allow for duplicate keys at the host level.

    Comment

    • garyalexza
      Junior Member
      • Jul 2009
      • 2

      #3
      The new key is for a template added to one host. However the itemid its trying to use for the insertion into the database is for another item on an unrelated template assigned to an unrelated host.

      I'm wondering where when adding the new item, zabbix frontend decides on the itemid to use, because its seems to be getting this wrong.

      This is the error its giving back:

      Code:
      Error in query [INSERT INTO items (itemid,description,key_,hostid,delay,history,nextcheck,status,type,snmp_community,snmp_oid,value_type,trapper_hosts,snmp_port,units,multiplier,delta,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authpassphrase,snmpv3_privpassphrase,formula,trends,logtimefmt,valuemapid,delay_flex,params,ipmi_sensor,templateid) VALUES (42551,'Bind Disconnects 1','zabbix[bind_1.log]',10209,600,90,0,0,0,'public','interfaces.ifTable.ifEntry.ifInOctets.1',3,'',161,'',0,0,'',0,'','','1',365,'',0,'','DSN=<database source name>\\nuser=<user name>\\npassword=<password>\\nsql=<query>','',0)] [Duplicate entry '42551' for key 1]

      Comment

      Working...