Closed sliwa95 closed 6 years ago
Hi, I fixed the docu regarding the "keyword = value" issue, as it should be with "=". Thanks for catching that. The idea is that you start with password = yourplaintextpassword and keep password_enc empty. zbxdb.py should see that as a reason to encrypt the password and write the config file with password empty and password_enc filled with the 'encrypted' version.
Regarding oracle wallet .... you can create the wallet on a database server since the tools are only in the rdbms installation and not in the clients installation and copy that to your client.
$>cat etc/z.cfg
[zbxdb]
db_url = //IP-ADDRESS/ORAPROD1
username = zbxdbmon
password = verysekret
db_type = oracle
db_driver = cx_Oracle
instance_type = rdbms
role = normal
out_dir = $HOME/zbxora_out
hostname = OracleDB1
checks_dir = etc/zbxdb_checks
site_checks = sap,ebs
password_enc =
client ronr@ronrmb03:~/Documents/git/zbxdb
$>bin/zbxdb.py -c etc/z.cfg
2018-09-04 13:33:27 start python-3.6.4 zbxdb-0.69 pid=65208 Connecting for hostname OracleDB1...
2018-09-04 13:33:27 first encrypted the plaintext password and removed from config
2018-09-04 13:33:27.115552 zbxdb found db_type=oracle, driver cx_Oracle; checking for driver
<module 'cx_Oracle' from '/Users/ronr/.pyenv/versions/3.6.4/lib/python3.6/site-packages/cx_Oracle.cpython-36m-darwin.so'>
2018-09-04 13:33:27.126744 zbxdb driver cx_Oracle loaded
2018-09-04 13:33:27.131736 zbxdb driver drivererrors for cx_Oracle loaded
2018-09-04 13:33:27.134124 zbxdb dbconnections for oracle loaded
<module 'dbconnections.oracle' from '/Users/ronr/Documents/git/zbxdb/bin/dbconnections/oracle.py'>
<module 'drivererrors.cx_Oracle' from '/Users/ronr/Documents/git/zbxdb/bin/drivererrors/cx_Oracle.py'>
2018-09-04 13:33:27.134213 site_checks: sap,ebs
2018-09-04 13:33:27.134225 out_file:/Users/ronr/zbxora_out/z.zbx
2018-09-04 13:33:27.517331: (1.1)connection error: [12154] ORA-12154: TNS:could not resolve the connect identifier specified for zbxdbmon@//IP-ADDRESS/ORAPROD1
^CTraceback (most recent call last):
File "bin/zbxdb.py", line 246, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "bin/zbxdb.py", line 599, in
$>cat etc/z.cfg [zbxdb] db_url = //IP-ADDRESS/ORAPROD1 username = zbxdbmon password = db_type = oracle db_driver = cx_Oracle instance_type = rdbms role = normal out_dir = $HOME/zbxora_out hostname = OracleDB1 checks_dir = etc/zbxdb_checks site_checks = sap,ebs password_enc = Z2xxYZyXzYTdi
Hello,
we are getting the same error. My zbxdb.odb.cfg file looks like this (changed db_url, password and hostname):
[zbxdb] db_url = //ip:1521/db username = zabmbh password = mypassword db_type = oracle db_driver = cx_Oracle instance_type = rdbms role = normal out_dir = $HOME/zbxora_out hostname = server checks_dir = etc/zbxdb_checks site_checks = sap,ebs password_enc =
When trying to run the script with "./bin/zbxdb.py -c ./etc/zbxdb.odb.cfg"
this error occurs:
Traceback (most recent call last):
File "./bin/zbxdb.py", line 146, in
Which version of Python and which version of zbxdb.py are you using? They are reported on the first 3 lines on stdout of zbxdb.py
Yeah, it was (so obvious now) Python version in my case. Have both 2.7 and 3.5.2, and my Ubuntu 16.04 defaulted to 2.7. On virtualenv it started working. Of course it did error on me after that, because I've forgot to create _zbxoraout directory ;)
Thanks for fast response with documentation and pointing to Python version.
I'll reedit issue, as it should point now as documentation inconsistency was real issue.
thanks for helping make zbxdb a better tool.
Can't use Oracle Wallet (have to run ZbxDB on different machine than both Zabbix server and Oracle instance), so have to live with usr/pwd in config file. Documentation doesn't show how to configure it currently, so I've tried setting _passwordenc with default value, empty or even commenting it, same error on run.
Another thing. Documentation shows different config file layout than files in repo (documentation says
username: zbxdbmon
while in files in repo it isusername = zbxdbmon
. Which one is correct?Trying to run configured ZabbixDB with command: zbxdb.py -c etc/zbxdb.orabss.cfg
zbxdb.orabss.cfg looks like: