Oracle Zabbix by ODBC
Oracle Database, version 12c2, 18c, 19c
· Create an Oracle DB user for monitoring:
· Create User on oracle db user for monitoring on target database
· Install Oracle Client on Zabbix mysql database server
· Setup environment variables on bash_profile
· Create tnsnames.ora file with sample connect descriptor
· Add entry on odbc.ini
· Test using i sql connection
· Add host entry & select template options
· Add Macro Entry on Zabbix Console
https://www.zabbix.com/integrations/oracle
STEP 1:
CREATE USER zabbix_mon IDENTIFIED BY <PASSWORD>;
-- Grant access to the zabbix_mon user.
GRANT CONNECT, CREATE SESSION TO zabbix_mon;
GRANT SELECT ON v$instance TO zabbix_mon;
GRANT SELECT ON v$database TO zabbix_mon;
GRANT SELECT ON v$sysmetric TO zabbix_mon;
GRANT SELECT ON v$system_parameter TO zabbix_mon;
GRANT SELECT ON v$session TO zabbix_mon;
GRANT SELECT ON v$recovery_file_dest TO zabbix_mon;
GRANT SELECT ON v$active_session_history TO zabbix_mon;
GRANT SELECT ON v$osstat TO zabbix_mon;
GRANT SELECT ON v$restore_point TO zabbix_mon;
GRANT SELECT ON v$process TO zabbix_mon;
GRANT SELECT ON v$datafile TO zabbix_mon;
GRANT SELECT ON v$pgastat TO zabbix_mon;
GRANT SELECT ON v$sgastat TO zabbix_mon;
GRANT SELECT ON v$log TO zabbix_mon;
GRANT SELECT ON v$archive_dest TO zabbix_mon;
GRANT SELECT ON v$asm_diskgroup TO zabbix_mon;
GRANT SELECT ON sys.dba_data_files TO zabbix_mon;
GRANT SELECT ON DBA_TABLESPACES TO zabbix_mon;
GRANT SELECT ON DBA_TABLESPACE_USAGE_METRICS TO zabbix_mon;
GRANT SELECT ON DBA_USERS TO zabbix_mon;
STEP 2:
Install Oracle Client on Zabbix mysql Repository database server
STEP 3 :
Set Environment variable
export ORACLE_HOME=/usr/lib/oracle/12.2/client64
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib64:/usr/lib:$ORACLE_HOME/bin
export TNS_ADMIN=$ORACLE_HOME/network/admin
STEP 4 :
Add tnsnames.ora entry on oracle client
cat =/usr/lib/oracle/12.2/client64/network/admin/tnsnames.ora
Add entry on tnsnames.ora file
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ORCL.EXAMPLE.COM)(PORT = 1523))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)
STEP 4 :
Add Value in /cat /odbc.ini file
[root@0209RUPAV006TVS etc]# cat odbc.ini
[db12c]
Driver = Oracle12c
Driver =/usr/lib/oracle/12.2/client64/lib/libsqora.so.12.1
Servername = 10.33.104.254:1523/ ORCL
Database = ORCL
Port = 1523
UserID = zabbix_mon
Password = zabbix_mon
DatabaseCharacterSet=AL16UTF16
STEP 5:
Test on sql console
[root@test etc]# isql -v ORCL
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select name from v$database;
+----------+
| NAME |
+----------+
| ORCL |
+----------+
SQLRowCount returns -1
1 rows fetched
STEP 6 :
Login Zabbix Console : username/password
(Entry is added on mysql database repository server)
Graphical user interface, text, application
Description automatically generated
Graphical user interface, text, application, email
Description automatically generated
STEP 7 :
Go to configuration setting and select host option then create host
· Mention host group for monitoring
Graphical user interface, application
Description automatically generated
· Select Template
Graphical user interface, application
Description automatically generated
· Select oracle ODBC Template
Graphical user interface, application
Description automatically generated
· Provide IP address DNS and Proxy server details
Graphical user interface, text, application, email
Description automatically generated
Graphical user interface, text, application
Description automatically generated
· Go to Macro Entry and mentioned details same as in odbc.ini file
Graphical user interface, application
Description automatically generated
· Advanced Macro Entry (optional)
Graphical user interface, application
Description automatically generated
· Template Details
Graphical user interface, text, application, email
Description automatically generated
· Zabbix Graph Monitoring
Graphical user interface, text, application, email
Description automatically generated
A screenshot of a computer
Description automatically generated
Graphical user interface, chart, application
Description automatically generated
Graphical user interface, text, application, email
Description automatically generated
Table
Description automatically generated Table
Description automatically generated