[ZBX-6008] DM-fix for zabbix server with oracle database Created: 2012 Dec 17  Updated: 2017 May 30  Resolved: 2014 May 20

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.4
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Harry Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: distributed, dm, oracle, patch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix 2.0.4
Oracle Database 11g Enterprise Edition (v11.2.0.3.0)
Linux RedHat 6.2, Kernel 2.6.32, VM


Attachments: File nodesender.c     File package_gethash.sql    

 Description   

For the synchronization between master and child in distributed monitoring two SQL-functions are used (md5 and cast number to char). Unfortunately Oracle has no built-in md5 function and also a cast from number to char is not possible.

That resulted in the following errors:

[Z3005] query failed: [-1] ORA-00904: "MD5": invalid identifier [insert into node_cksum (nodeid,tablename,recordid,cksumtype,cksum) select 2,'maintenances',maintenanceid,1,md5(name)||','||maintenance_type||','||md5(description)||','||active_since||','||active_till from maintenances where 1=1 and maintenanceid between 200000000000000 and 299999999999999]

[Z3005] query failed: [-1] ORA-25137: Data value out of range [insert into node_cksum (nodeid,tablename,recordid,cksumtype,cksum) select 2,'screens',screenid,1,md5(name)||','||hsize||','||vsize||','||case when templateid is null then 'NULL' else cast(templateid as char) end from screens where 1=1 and screenid between 200000000000000 and 299999999999999]

Therefore I created a patch for the Oracle DB as well as the Zabbix server.
The SQL patch creates a package with two overloaded md5 functions (for varchar and blob). These functions use the dbms_crypto interface from Oracle (information about granting the rights is also in the file).
The nodesender.c file contains sections especially for Oracle where the md5 function from the SQL patch are used and the cast from number to char is replaced by a cast from number to varchar(25).

Maybe this patch will be added to Zabbix to one of the next updates.



 Comments   
Comment by Alexander Vladishev [ 2014 May 20 ]

Node based distributed monitoring will be removed for 2.4.0. In this regard, it will not be fixed in earlier versions.

Generated at Sat Apr 27 06:59:42 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.