-
Change Request
-
Resolution: Fixed
-
Trivial
-
None
-
None
-
Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021)
-
2
When installing a ZABBIX server independent from Oracle RDBMS (not on a single server) - you will face the inconvenience of deploying the Zabbix database and the offered SQL files for creating an Oracle schema which comes with data and image data that is need to copy all images to the Oracle server fileystem (../misc/images/png_modern/* .png) to run this procedure later which loads the contents to the BLOB field from the filesystem files.
CREATE OR REPLACE PROCEDURE LOAD_IMAGE (IMG_ID IN NUMBER, IMG_TYPE IN NUMBER, IMG_NAME IN VARCHAR2, FILE_NAME IN VARCHAR2) IS TEMP_BLOB BLOB := EMPTY_BLOB(); BFILE_LOC BFILE; BEGIN DBMS_LOB.CREATETEMPORARY(TEMP_BLOB,TRUE,DBMS_LOB.SESSION); BFILE_LOC := BFILENAME('IMAGE_DIR', FILE_NAME); DBMS_LOB.FILEOPEN(BFILE_LOC); DBMS_LOB.LOADFROMFILE(TEMP_BLOB, BFILE_LOC, DBMS_LOB.GETLENGTH(BFILE_LOC)); DBMS_LOB.FILECLOSE(BFILE_LOC); INSERT INTO IMAGES VALUES (IMG_ID, IMG_TYPE, IMG_NAME, TEMP_BLOB); COMMIT; END LOAD_IMAGE; / BEGIN LOAD_IMAGE(1,1,'Cloud_(128)','png_modern/Cloud_(128).png'); LOAD_IMAGE(2,1,'Cloud_(24)','png_modern/Cloud_(24).png'); ....
Instead I suggest loading the contents of the BLOB fields from the CBLOB (created from the BASE64 string that contains the PNG image data).
base64encode.sql
base64decode.sql
Or then create a column with text information (CLOB, VARCHAR2) which contains only BASE64 content, which can later be converted in the Zabbix UI using PHP to the displayed image.
This is just to reduce the inconvenience and time saving. Even more a such a thing already exists in MySQL and PGSQL Zabbix provided source SQL files (images.sql) - and that is only natural
- mentioned in
-
Page Loading...