[ZBX-4006] Importing a template that updates an existing, yields oracle errors Created: 2011 Aug 02  Updated: 2017 May 30  Resolved: 2011 Oct 21

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.5
Fix Version/s: 1.8.9

Type: Incident report Priority: Blocker
Reporter: Gergely Czuczy Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: oracle, trivial, xml
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Oracle 10g2 server, oracle 11g2 cliens



 Description   

When re-importing an existing template, oracle errors are generated for the item update queries. Queries:
SQL error [ORA-00936: missing expression] in [UPDATE items SET description='ping',key_='icmpping',hostid=10166,delay=300,history=7,type=3,snmp_community='',snmp_oid='',value_type=3,data_type=0,trapper_hosts='',snmp_port=161,units='',multiplier=0,delta=0,snmpv3_securityname='',snmpv3_securitylevel=,snmpv3_authpassphrase='',snmpv3_privpassphrase='',formula='',trends=365,logtimefmt='',valuemapid=0,delay_flex='',params='',ipmi_sensor='',templateid=85208,authtype=0,username='',password='',publickey='',privatekey='' WHERE itemid=81794]

here, the following is wrong: snmpv3_securitylevel=

this an integer, NOT NULL column in the database, that means it MUST have a value, which the zabbix fronted omits.

Fix: add the securitylevel to the query when updating an item



 Comments   
Comment by Gergely Czuczy [ 2011 Aug 02 ]

It seems like $item['snmpv3_securitylevel'] doesn't have a value at includes/items.inc.php:638

Comment by Alexey Fukalov [ 2011 Oct 11 ]

Seems that in template you have empty value for "snmpv3_securitylevel". Where did you get that template from?

Comment by Gergely Czuczy [ 2011 Oct 11 ]

I've been using my own template generator. In the template this attribute is do filled in, that means, the value in the XML for for this field is not empty. That is, it has a value in the XML file.

For some reason, it didn't make it into the query.

Comment by Alexey Fukalov [ 2011 Oct 11 ]

Could you please attach template that you are trying to import? I tested with default template from Zabbix distribution and import worked fine.

Comment by Gergely Czuczy [ 2011 Oct 11 ]

Sorry, but i'm strictly prohobited from publishing any templates we're using, because of company policy. It's an snmp v3 template. It's not any default template, and it's not the import, it's the update. For that you'll have to import a template twice, that contains snmp v3 items. The first import imports the template, creates it. The second import will try to update it, hence the "update" word in the title of this ticket.

Comment by Alexey Fukalov [ 2011 Oct 11 ]

Ok, does error appear if you export that template using Zabbix frontend and import resulting XML?

Comment by richlv [ 2011 Oct 11 ]

please note that it's extremely hard to debug specific issues if full information is not provided. you could strip down the template to minimum required to reproduce the problem and sanitise it from all sensitive information

Comment by Alexey Fukalov [ 2011 Oct 20 ]

As we cannot reproduce this problem in our environment, could you please provide us template example without sensitive data as richlv suggested?

Comment by Alexey Fukalov [ 2011 Oct 21 ]

We cannot reproduce this error, if you have any additional information or steps how to reproduce it, please reopen this issue.

Generated at Thu Apr 25 08:59:49 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.