Before that, unixODBC was installed
And Oracle ODBC driver installed is:
And odbcinst.ini:
[Oracle-11g]
Description=ODBC for Oracle
Driver=/usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1
UsageCount=1
FileUsage=1
Driver Logging = 7
odbc.ini:
[test]
Driver = Oracle-11g
DSN = Oracle-11g
ServerName = gzdb
UserID = xxx
Password = xxx
And ODBC connection is working successfully
shell> isql -v test
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
To enable ODBC support, I recompiled zabbix3.0 with flag: --with-unixodbc
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc
and replace the old zabbix_sever with new binary compiled.
However, When I create "Database Monitor" item in zabbix,there is still an error: enter image description here
So I run su - zabbix -c "ldd /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1"
it appears ok
su - zabbix -c "ldd /usr/lib/oracle/11.2/client64/lib/libsqora.so.11.1"
linux-vdso.so.1 => (0x00007fffe21ee000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f1ad095e000)
libm.so.6 => /lib64/libm.so.6 (0x00007f1ad06d9000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f1ad04bc000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f1ad02a3000)
libclntsh.so.11.1 => /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1 (0x00007f1acdd72000)
libodbcinst.so.1 => /usr/lib64/libodbcinst.so.1 (0x00007f1acdb61000)
libc.so.6 => /lib64/libc.so.6 (0x00007f1acd7cd000)
/lib64/ld-linux-x86-64.so.2 (0x000000373c600000)
libnnz11.so => /usr/lib/oracle/11.2/client64/lib/libnnz11.so (0x00007f1acd404000)
libaio.so.1 => /lib64/libaio.so.1 (0x00007f1acd203000)
libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f1accffa000)
I really do not know what the error means
That because your zabbix server doesn't know where to look for the Oracle lib. Try to export environment variable LD_LIBRARY_PATH to the zabbix server
Don't know what OS you are using, I'm on CentOS 7
create /etc/sysconfig/zabbix-server file, and edit with
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib"
export LD_LIBRARY_PATH
then restart zabbix-server