Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL duplicate key while importing template #19

Open
rezass opened this issue Apr 28, 2018 · 0 comments
Open

SQL duplicate key while importing template #19

rezass opened this issue Apr 28, 2018 · 0 comments

Comments

@rezass
Copy link

rezass commented Apr 28, 2018

I tried to convert mib file for megaraid controller and importing it to zabbix fails with the below error:

mib file: LSI-MegaRAID-SAS-MIB.mib.txt

Error in query [INSERT INTO items (name,authtype,data_type,delay,delay_flex,delta,description,formula,history,inventory_link,ipmi_sensor,logtimefmt,multiplier,params,password,port,privatekey,publickey,snmp_community,snmp_oid,snmpv3_authpassphrase,snmpv3_authprotocol,snmpv3_contextname,snmpv3_privpassphrase,snmpv3_privprotocol,snmpv3_securitylevel,snmpv3_securityname,status,trends,type,units,username,value_type,key_,trapper_hosts,hostid,interfaceid,flags,itemid) VALUES ('enclosureID for {#SNMPINDEX}','0','0','60','','0','EnclosureID for this enclosure.(Unique)','1','7','0','','','0','','','{$SNMP_PORT}','','','{$SNMP_COMMUNITY}','.1.3.6.1.4.1.3582.4.1.5.2.1.1.{#SNMPINDEX}','','0','','','0','0','','0','365','4','','','0','enclosureID[{#SNMPINDEX}]','','10160',NULL,'2','33490')] [Duplicate entry '10160-enclosureID[{#SNMPINDEX}]' for key 'items_1'] SQL statement execution has failed "INSERT INTO items (name,authtype,data_type,delay,delay_flex,delta,description,formula,history,inventory_link,ipmi_sensor,logtimefmt,multiplier,params,password,port,privatekey,publickey,snmp_community,snmp_oid,snmpv3_authpassphrase,snmpv3_authprotocol,snmpv3_contextname,snmpv3_privpassphrase,snmpv3_privprotocol,snmpv3_securitylevel,snmpv3_securityname,status,trends,type,units,username,value_type,key_,trapper_hosts,hostid,interfaceid,flags,itemid) VALUES ('enclosureID for {#SNMPINDEX}','0','0','60','','0','EnclosureID for this enclosure.(Unique)','1','7','0','','','0','','','{$SNMP_PORT}','','','{$SNMP_COMMUNITY}','.1.3.6.1.4.1.3582.4.1.5.2.1.1.{#SNMPINDEX}','','0','','','0','0','','0','365','4','','','0','enclosureID[{#SNMPINDEX}]','','10160',NULL,'2','33490')". [conf.import.php:176 → CFrontendApiWrapper->import() → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → call_user_func_array() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CItemPrototype->create() → CItemPrototype->createReal() → DB::insert() → DB::exception() in include/classes/db/DB.php:441]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant