[ZBX-5691] when adding new graph to template get lot's of SQL error Created: 2012 Oct 11 Updated: 2017 May 30 Resolved: 2012 Oct 19 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.3 |
Fix Version/s: | 2.0.4rc1, 2.1.0 |
Type: | Incident report | Priority: | Minor |
Reporter: | Alexander Romanov | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | graphs, oracle | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian 6.0.6, Oracle 11g, Apache2 |
Attachments: |
![]() |
||||||||
Issue Links: |
|
Description |
I'm trying to add graph to template and get this errors in frontend: ociexecute(): ORA-01722: invalid number [include/db.inc.php:517] |
Comments |
Comment by Alexander Vladishev [ 2012 Oct 15 ] |
All this SQL statements are executed without errors on our test environment. Probably a problem in database structure. describe graphs; describe graphs_items; |
Comment by Alexander Romanov [ 2012 Oct 15 ] |
describe graphs; SQL> describe graphs; Name Null? Type ----------------------------------------- -------- ---------------------------- GRAPHID NOT NULL NUMBER(20) NAME NVARCHAR2(128) WIDTH NOT NULL NUMBER(10) HEIGHT NOT NULL NUMBER(10) YAXISMIN NOT NULL NUMBER(20,4) YAXISMAX NOT NULL NUMBER(20,4) TEMPLATEID NUMBER(20) SHOW_WORK_PERIOD NOT NULL NUMBER(10) SHOW_TRIGGERS NOT NULL NUMBER(10) GRAPHTYPE NOT NULL NUMBER(10) SHOW_LEGEND NOT NULL NUMBER(10) SHOW_3D NOT NULL NUMBER(10) PERCENT_LEFT NOT NULL NUMBER(20,4) PERCENT_RIGHT NOT NULL NUMBER(20,4) YMIN_TYPE NOT NULL NUMBER(10) YMAX_TYPE NOT NULL NUMBER(10) YMIN_ITEMID NUMBER(20) YMAX_ITEMID NUMBER(20) FLAGS NOT NULL NUMBER(10) describe graphs_items; SQL> describe graphs_items; Name Null? Type ----------------------------------------- -------- ---------------------------- GITEMID NOT NULL NUMBER(20) GRAPHID NOT NULL NUMBER(20) ITEMID NOT NULL NUMBER(20) DRAWTYPE NOT NULL NUMBER(10) SORTORDER NOT NULL NUMBER(10) COLOR NVARCHAR2(6) YAXISSIDE NOT NULL NUMBER(10) CALC_FNC NOT NULL NUMBER(10) TYPE NOT NULL NUMBER(10) |
Comment by Alexander Vladishev [ 2012 Oct 15 ] |
What default values have the 'graphs.templateid' and 'graphs.flags' fields? |
Comment by Alexander Romanov [ 2012 Oct 15 ] |
sorry, i doesn't know, where can i get this information |
Comment by Alexander Vladishev [ 2012 Oct 15 ] |
You can use the statement: select column_name,data_default from dba_tab_columns where table_name = 'GRAPHS' and owner = '<owner>' and column_name in ('FLAGS', 'TEMPLATEID'); Please change '<owner>' to correct value. |
Comment by Alexander Romanov [ 2012 Oct 15 ] |
TEMPLATEID (null) FLAGS '0' |
Comment by Alexander Vladishev [ 2012 Oct 16 ] |
Probably with tables everything is all ok. Please check NLS_NUMERIC_CHARACTERS variable. Its should contains '.' (dot). select value from nls_database_parameters where parameter = 'NLS_NUMERIC_CHARACTERS'
|
Comment by Alexander Romanov [ 2012 Oct 18 ] |
Result is ',' (comma). I use oracle instance not only for monitoring. So, as i suppose, i have to options: ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '. '
somewhere in zabbix fronted. |
Comment by Alexander Vladishev [ 2012 Oct 18 ] |
Thanks, it will be added in future releases. |
Comment by Alexander Romanov [ 2012 Oct 19 ] |
That's good. |
Comment by Alexey Fukalov [ 2012 Oct 19 ] |
Dev branch: svn://svn.zabbix.com/branches/dev/ZBX-5691 |
Comment by Alexander Romanov [ 2012 Oct 19 ] |
Thanks, this ticket solves not only described problem, but also some others, for example simple graphs of Template Linux item - CPU IO WAIT, as i suppose - because of '.' or ',' in NLS |
Comment by Alexander Vladishev [ 2012 Oct 19 ] |
Successfully tested! Please review my changes in r30991:30992. |
Comment by Alexey Fukalov [ 2012 Oct 19 ] |
Fixed in 2.0.4rc1 r30993, pre-2.1.0 r30994. |
Comment by Fabiano Souza [ 2014 Feb 28 ] |
When you create a graph changes these two items: Y axis MIN value = Fized = 0 |