OracleDB plugin fails to run because it lacks environment variables. Following the guide for the oracledb collector, running ./python.d.plugin oracledb debug trace fails with DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help. However if I run export ORACLE_HOME=/oracle/product/19.3.0/dbhome_1 export LD_LIBRARY_PATH=$ORACLE_HOME/lib and the collector connects as expected. It appears the netdata user does not have a bashrc or bash_profile OR read from /etc/profile(.d)/ and it also does not reference the [environment variables] section in netdata.conf. This issue was brought up in the below referenced git issue, but was closed with no conversation.
Relevant docs you followed/actions you took to solve the issue
Environment/Browser/Agent’s version etc
Netdata Agent: 1.39.1
`
uname -a
Linux oracletest2.hcmsgroup.com 4.14.35-2047.522.3.el7uek.x86_64 #2 SMP Fri Jan 20 16:05:02 PST 2023 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/os-release
NAME=“Oracle Linux Server”
VERSION=“7.9”
ID=“ol”
ID_LIKE=“fedora”
VARIANT=“Server”
VARIANT_ID=“server”
VERSION_ID=“7.9”
PRETTY_NAME=“Oracle Linux Server 7.9”
`
Hi, @bergc. We recently added support for python-oracledb. This change is in the nightly version. If you are using nightly - consider switching to python-oracledb.
Hey @ilyam8, thanks for the quick response!
Can I switch from the stable to nightly release without reinstalling? And when do you expect these changes to hit stable? We are testing to implement in more critical systems and I would really like to stay on stable if at all possible. Is there any documentation about setting up python-oracledb? I don’t see anything in the linked issue.
Ok it looks like we got the plugin working however oracledb.chart.py will only use tcps and we had to modify line 341 to support a tcp connection. It would be nice to be able to specify the connection type in the config.
Awesome, thanks! We also noted the plugin only appears to process the first job if multiple are defined. Running ./python.d.plugin oracledb debug trace produces:
But if you watch the output of the plugin it only ever gathers oracledb[CDB] and the cloud site only shows one oracledb entry with no indication of the job name or which db metrics it’s showing.