Closed starlessboi closed 5 years ago
Sir this the path,
monitor@NPDFINN-200-161:~$ echo $PATH /home/monitor/.pyenv/plugins/pyenv-virtualenv/shims:/home/monitor/.pyenv/shims:/home/monitor/.pyenv/bin:/home/monitor/bin:/home/monitor/.local/bin:/home/monitor/.pyenv/plugins/pyenv-virtualenv/shims:/home/monitor/.pyenv/shims:/home/monitor/.pyenv/bin:/usr/java/jdk1.8.0_77/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/monitor/bin:/usr/bin/python3.6:/home/monitor/zbxdb/bin
looks good.
than what's the error??
Shall I switch from ubuntu to rhel? and create a zabbix proxy as my zabbix server is running on ubuntu and Iwas trying to do all this here at zabbix server(ubuntu)
I have no idea. I have quite a few installations on rhel and centos. It could help. For me what happens looks strange. I have no experience with ubuntu.
Sir now I am running zbxdb on RHEL 7 and facing sqlparese error, sqlparse is not a part of of python packages. can you tell me the rpm packages of requirement.txt as my infra team is asking for RPM packages for RHEL-7 in which these can be covered
sqlparse>=0.2.4 cx-Oracle>=6.1 psycopg2>=2.7.5 python-tds>=1.9.1 PyMySQL>=0.9.2 pypsrp>=0.4.0 sqlanydb>=1.0.10 ibm-db>=3.0.1 pyOpenSSL>=19.1.0
Hi, no I can not list rpm's. Smartest is to check out the requirements for pyenv-installer. For the compilation of the cx_Oracle module you will need some gcc support. Normally I use minimal install, with the requirements for zabbix server. Most things needed will be there for you, plus a few packages that pyenv-installer needs.
Hi Sir,
i have switched to new VM running on RHEL7 and having python 3.7.4 already installed
Now when I ran this command "curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash"
it gave me below error
[jboss@TEST-UAT-63-95 site-packages]$ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 148 100 148 0 0 486 0 --:--:-- --:--:-- --:--:-- 488 100 2454 100 2454 0 0 4516 0 --:--:-- --:--:-- --:--:-- 4516 pyenv: Git is not installed, can't continue.
Since you want to install things taken from GitHub you need got to be installed: yum install git
sir I have a question when i have puthon 3.7 already installed on my machine why i have to follow these two steps again
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
pyenv install 3.6.5
You don't need to but you do need to install some python packages. In my experiences it is easier to have a local installation, in my control where I can pick the version exactly like I need.
So, try to install the pip install -r zbxdb/requirements.txt
Hi Sir, I moved one step ahead now.
[jboss@TEST-UAT-63-95 ~]$ pyenv install 3.6.5 Downloading Python-3.6.5.tar.xz... -> https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz Installing Python-3.6.5... WARNING: The Python readline extension was not compiled. Missing the GNU readline lib? WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib? Installed Python-3.6.5 to /home/jboss/.pyenv/versions/3.6.5
the warning are coming because oracle client is not installed??
no, because the sqlite libraries are missing. For zbxdb not a problem. You might want to install sqlite-devel
Ok Sir ,
I tried runnning pip command please look into logs
**[jboss@TEST-UAT-63-95 ~]$ pip install -r zbxdb/requirements.txt pyenv: pip: command not found
The `pip' command exists in these Python versions: 3.6.5
Note: See 'pyenv help global' for tips on allowing both python2 and python3 to be found.**
pyenv global 3.6.5 next: pip install .....
[jboss@TEST-UAT-63-95 ~]$ pip install -r zbxdb/requirements.txt Collecting sqlparse>=0.2.4 (from -r zbxdb/requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/85/ee/6e821932f413a5c4b76be9c5936e313e4fc626b33f16e027866e1d60f588/sqlparse-0.3.1-py2.py3-none-any.whl (40kB) 100% |████████████████████████████████| 40kB 722kB/s Collecting cx-Oracle>=6.1 (from -r zbxdb/requirements.txt (line 2)) Downloading https://files.pythonhosted.org/packages/d5/15/d38862a4bd0e18d8ef2a3c98f39e743b8951ec5efd8bc63e75db04b9bc31/cx_Oracle-7.3.0-cp36-cp36m-manylinux1_x86_64.whl (737kB) 100% |████████████████████████████████| 737kB 1.2MB/s Collecting psycopg2>=2.7.5 (from -r zbxdb/requirements.txt (line 3)) Downloading https://files.pythonhosted.org/packages/a8/8f/1c5690eebf148d1d1554fc00ccf9101e134636553dbb75bdfef4f85d7647/psycopg2-2.8.5.tar.gz (380kB) 100% |████████████████████████████████| 389kB 1.9MB/s Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/psycopg2.egg-info writing pip-egg-info/psycopg2.egg-info/PKG-INFO writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-51886w_5/psycopg2/ You are using pip version 9.0.3, however version 20.0.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. [jboss@TEST-UAT-63-95 ~]$
Shall I update pip using above command
if you have no need to monitor postgres you can remove psycopg2 from the requirements.txt Yes, upgrade pip and re-run.
if you do need postgres monitoring, install postgres-devel
I ignored postgres and sucessfully installed rest of the items.
Now I am going to run.
zbxdb.py -c etc/zbxdb.ZBXDB_NDLI_19.cfg
[jboss@TEST-UAT-63-95 ~]$ pip install -r zbxdb/requirements.txt Collecting sqlparse>=0.2.4 Using cached sqlparse-0.3.1-py2.py3-none-any.whl (40 kB) Collecting cx-Oracle>=6.1 Using cached cx_Oracle-7.3.0-cp36-cp36m-manylinux1_x86_64.whl (737 kB) Collecting python-tds>=1.9.1 Downloading python-tds-1.10.0.tar.gz (66 kB) |████████████████████████████████| 66 kB 1.3 MB/s Collecting PyMySQL>=0.9.2 Downloading PyMySQL-0.9.3-py2.py3-none-any.whl (47 kB) |████████████████████████████████| 47 kB 9.5 MB/s Collecting pypsrp>=0.4.0 Downloading pypsrp-0.4.0-py2.py3-none-any.whl (91 kB) |████████████████████████████████| 91 kB 17.3 MB/s Collecting sqlanydb>=1.0.10 Downloading sqlanydb-1.0.10.tar.gz (19 kB) Collecting ibm-db>=3.0.1 Downloading ibm_db-3.0.1.tar.gz (642 kB) |████████████████████████████████| 642 kB 31.6 MB/s Collecting pyOpenSSL>=19.1.0 Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB) |████████████████████████████████| 53 kB 5.8 MB/s Collecting six>=1.4.1 Downloading six-1.14.0-py2.py3-none-any.whl (10 kB) Collecting cryptography Downloading cryptography-2.9-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB) |████████████████████████████████| 2.7 MB 41.5 MB/s Collecting requests>=2.9.1 Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB) |████████████████████████████████| 58 kB 12.6 MB/s Collecting ntlm-auth>=1.2.0 Downloading ntlm_auth-1.4.0-py2.py3-none-any.whl (29 kB) Collecting cffi!=1.11.3,>=1.8 Downloading cffi-1.14.0-cp36-cp36m-manylinux1_x86_64.whl (399 kB) |████████████████████████████████| 399 kB 40.1 MB/s Collecting chardet<4,>=3.0.2 Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB) |████████████████████████████████| 133 kB 33.9 MB/s Collecting certifi>=2017.4.17 Downloading certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB) |████████████████████████████████| 157 kB 31.9 MB/s Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 Downloading urllib3-1.25.8-py2.py3-none-any.whl (125 kB) |████████████████████████████████| 125 kB 38.0 MB/s Collecting idna<3,>=2.5 Downloading idna-2.9-py2.py3-none-any.whl (58 kB) |████████████████████████████████| 58 kB 11.8 MB/s Collecting pycparser Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB) |████████████████████████████████| 112 kB 42.1 MB/s Installing collected packages: sqlparse, cx-Oracle, six, python-tds, PyMySQL, pycparser, cffi, cryptography, chardet, certifi, urllib3, idna, requests, ntlm-auth, pypsrp, sqlanydb, ibm-db, pyOpenSSL Running setup.py install for python-tds ... done Running setup.py install for sqlanydb ... done Running setup.py install for ibm-db ... done Successfully installed PyMySQL-0.9.3 certifi-2020.4.5.1 cffi-1.14.0 chardet-3.0.4 cryptography-2.9 cx-Oracle-7.3.0 ibm-db-3.0.1 idna-2.9 ntlm-auth-1.4.0 pyOpenSSL-19.1.0 pycparser-2.20 pypsrp-0.4.0 python-tds-1.10.0 requests-2.23.0 six-1.14.0 sqlanydb-1.0.10 sqlparse-0.3.1 urllib3-1.25.8
Sir,
after all installation done i ran manually below command as you said.
cd /home/jboss/zbxdb/bin zbxdb.py -c etc/zbxdb.ZBXDB_NDLI_19.cfg
Configfile etc/zbxdb.ZBXDB_NDLI_19.cfg does not exist
but the config file exist where I am going wrong now after all efforts
[jboss@TEST-UAT-63-95 bin]$ zbxdb.py -c etc/zbxdb.ZBXDB_NDLI_19.cfg
Falling back to default logging config
CRITICAL:main:problem
Traceback (most recent call last):
File "/home/jboss/zbxdb/bin/zbxdb.py", line 820, in
Hi, the idea is that your home directory has: etc/ log/ zbxdb_out/ zbxdb_sender/ zbxdb/ folders.
in etc/ you create your zbxdb.ZBXDB_NDLI_19.cfg file. That file also has a pointer to the checks_dir = etc/zbxdb_checks If you keep it this way, you also need to copy the contents of zbxdb/etc/ to your local etc/ folder.
I have abided the instruction and created the same directory structure as you have mentioned in instructions,
[jboss@TEST-UAT-63-95 ~]$ ls -l total 4 drwxrwxr-x. 2 jboss jboss 6 Apr 15 19:28 etc drwxr-xr-x. 2 jboss jboss 6 Apr 15 14:07 log drwxr-xr-x. 7 jboss jboss 4096 Apr 15 14:14 zbxdb drwxr-xr-x. 2 jboss jboss 6 Apr 15 14:07 zbxdb_out drwxr-xr-x. 2 jboss jboss 6 Apr 15 14:15 zbxdb_sender
[jboss@TEST-UAT-63-95 ~]$ cd zbxdb [jboss@TEST-UAT-63-95 zbxdb]$ ls -l total 1156 drwxr-xr-x. 4 jboss jboss 178 Apr 15 14:14 bin -rwxr-xr-x. 1 jboss jboss 3345 Mar 26 12:24 CODE_OF_CONDUCT.md -rwxr-xr-x. 1 jboss jboss 643 Mar 26 12:24 CONTRIBUTING.md drwxr-xr-x. 2 jboss jboss 32 Apr 15 14:14 doc drwxr-xr-x. 4 jboss jboss 4096 Apr 15 14:20 etc drwxr-xr-x. 2 jboss jboss 246 Apr 15 14:14 example_tools -rwxr-xr-x. 1 jboss jboss 35149 Mar 26 12:24 LICENSE.txt -rwxr-xr-x. 1 jboss jboss 930 Mar 26 12:24 logging.json.example -rwxr-xr-x. 1 jboss jboss 17481 Mar 26 12:24 pylintrc -rwxr-xr-x. 1 jboss jboss 18546 Mar 26 12:24 README.md -rwxr-xr-x. 1 jboss jboss 127 Apr 15 18:58 requirements.txt -rwxr-xr-x. 1 jboss jboss 251790 Mar 26 12:24 zbxdb_template_v3.xml -rwxr-xr-x. 1 jboss jboss 398524 Mar 26 12:24 zbxdb_template_v4_EN.xml -rwxr-xr-x. 1 jboss jboss 398909 Mar 26 12:24 zbxdb_template_v4.xml -rwxr-xr-x. 1 jboss jboss 24 Mar 26 12:24 zbx_discover_lsnr.cfg -rwxr-xr-x. 1 jboss jboss 118 Mar 26 12:24 zbx_discover_lsnr.lld -rwxr-xr-x. 1 jboss jboss 4311 Mar 26 12:24 zbx_discover_oradbs.tmp -rwxr-xr-x. 1 jboss jboss 10273 Mar 26 12:24 zbx_oralsnr_template_v4_EN.xml
[jboss@TEST-UAT-63-95 zbxdb]$ cd etc/ [jboss@TEST-UAT-63-95 etc]$ ls -l total 40 -rwxr-xr-x. 1 jboss jboss 930 Mar 26 12:24 logging.json -rwxr-xr-x. 1 jboss jboss 940 Mar 26 12:24 logging_sender.json drwxr-xr-x. 8 jboss jboss 90 Apr 15 14:14 zbxdb_checks -rwxr-xr-x. 1 jboss jboss 408 Mar 26 12:24 zbxdb.crdb.cfg -rwxr-xr-x. 1 jboss jboss 303 Mar 26 12:24 zbxdb.db2.cfg -rwxr-xr-x. 1 jboss jboss 355 Mar 26 12:24 zbxdb.ms.cfg -rwxr-xr-x. 1 jboss jboss 317 Mar 26 12:24 zbxdb.mysql.cfg -rwxr-xr-x. 1 jboss jboss 270 Mar 26 12:24 zbxdb.odb.cfg -rwxr-xr-x. 1 jboss jboss 294 Mar 26 12:24 zbxdb.pgdb.cfg -rwxr-xr-x. 1 jboss jboss 296 Apr 14 18:38 zbxdb.ZBXDB_NDLI_19.cfg -rwxr-xr-x. 1 jboss jboss 297 Mar 26 12:24 zbx_discover_oradbs.cfg
Shall I copy my zbxdb.ZBXDB_NDLI_19.cfg in /home/jboss/zbxdb/etc/zbxdb_checks/oracle folder??
no, in the $HOME/etc/ folder or in $HOME/zbxdb/etc/ For upgrades you make your life a bit easier to us $HOME/etc/
in $HOME/zbxdb/etc/zxbdb_checks/ are the various files that are used to process the different databases/versions.
it is already present in $HOME/zbxdb/etc/ folder now I am copying it in $HOME/etc folder also.
[jboss@TEST-UAT-63-95 etc]$ cd /home/jboss/etc [jboss@TEST-UAT-63-95 etc]$ ls -l total 4 -rwxr-xr-x. 1 jboss jboss 296 Apr 14 18:38 zbxdb.ZBXDB_NDLI_19.cfg [jboss@TEST-UAT-63-95 etc]$
don't forget to cd back to $HOME, otherwise the shell is going to look for a etc/ folder inside your etc/ folder where you are now located id.
Lol.. I remembered going back to $HOME.
Now this issue is coming is it because oracle sql client is not installeld?
[jboss@TEST-UAT-63-95 ~]$ zbxdb.py -c etc/zbxdb.ZBXDB_NDLI_19.cfg Falling back to default logging config WARNING:main:start python-3.6.5 zbxdb-2.06 pid=124033 Connecting ...
WARNING:main:zbxdb found db_type=oracle, driver cx_Oracle; checking for driver
CRITICAL:main:problem
Traceback (most recent call last):
File "/home/jboss/zbxdb/bin/zbxdb.py", line 820, in
No, we are not that point yet. Now it looks like your etc/zbxdb_checks/ directory does not contain the oracle/ folder with the contents that are in zbxdb/etc/zbxdb_checks/
Sir it is there let me show you
[jboss@TEST-UAT-63-95 ~]$ cd /home/jboss/zbxdb/etc/zbxdb_checks [jboss@TEST-UAT-63-95 zbxdb_checks]$ ls -l total 4 drwxr-xr-x. 2 jboss jboss 27 Apr 15 14:14 cockroach drwxr-xr-x. 2 jboss jboss 28 Apr 15 14:14 db2 drwxr-xr-x. 2 jboss jboss 72 Apr 15 14:14 mssql drwxr-xr-x. 2 jboss jboss 48 Apr 15 14:14 mysql drwxr-xr-x. 2 jboss jboss 4096 Apr 15 14:14 oracle drwxr-xr-x. 2 jboss jboss 110 Apr 15 14:14 postgres
[jboss@TEST-UAT-63-95 zbxdb_checks]$ cd oracle/ [jboss@TEST-UAT-63-95 oracle]$ ls -l total 164 -rwxr-xr-x. 1 jboss jboss 2632 Mar 26 12:24 asm.11.cfg -rwxr-xr-x. 1 jboss jboss 3820 Mar 26 12:24 asm.12.cfg -rwxr-xr-x. 1 jboss jboss 4558 Mar 26 12:24 asmproxy.12.cfg -rwxr-xr-x. 1 jboss jboss 5476 Mar 26 12:24 ebs.cfg -rwxr-xr-x. 1 jboss jboss 5421 Mar 26 12:24 ebs.cfg.example -rwxr-xr-x. 1 jboss jboss 386 Mar 26 12:24 my_super_checks.cfg -rwxr-xr-x. 1 jboss jboss 19298 Mar 26 12:24 primary.10.cfg -rwxr-xr-x. 1 jboss jboss 19904 Mar 26 12:24 primary.11.cfg -rwxr-xr-x. 1 jboss jboss 21623 Mar 26 12:24 primary.12.cfg -rwxr-xr-x. 1 jboss jboss 21623 Mar 26 12:24 primary.18.cfg -rwxr-xr-x. 1 jboss jboss 0 Mar 26 12:24 sap.cfg -rwxr-xr-x. 1 jboss jboss 0 Mar 26 12:24 sap.cfg.example -rwxr-xr-x. 1 jboss jboss 4444 Mar 26 12:24 standby.10.cfg -rwxr-xr-x. 1 jboss jboss 4182 Mar 26 12:24 standby.11.cfg -rwxr-xr-x. 1 jboss jboss 8432 Mar 26 12:24 standby.12.cfg -rwxr-xr-x. 1 jboss jboss 8432 Mar 26 12:24 standby.18.cfg
just a sec do i need to paste zbxdb_checks directory in $HOME/etc folder where I copied my zbxdb.ZBXDB_NDLI_19.cfg file
I think it is working now
yes. This is in case you want to add own checks. If you do that in the original location, upgrades are more difficult.
^C [jboss@TEST-UAT-63-95 ~]$ zbxdb.py -c etc/zbxdb.ZBXDB_NDLI_19.cfg Falling back to default logging config WARNING:main:start python-3.6.5 zbxdb-2.06 pid=124949 Connecting ...
WARNING:main:zbxdb found db_type=oracle, driver cx_Oracle; checking for driver
INFO:main:<module 'cx_Oracle' from '/home/jboss/.pyenv/versions/3.6.5/lib/python3.6/site-packages/cx_Oracle.cpython-36m-x86_64-linux-gnu.so'> INFO:main:zbxdb driver cx_Oracle loaded
INFO:main:zbxdb driver drivererrors for cx_Oracle loaded
INFO:main:zbxdb dbconnections for oracle loaded
INFO:main:<module 'dbconnections.oracle' from '/home/jboss/zbxdb/bin/dbconnections/oracle.py'> INFO:main:<module 'drivererrors.cx_Oracle' from '/home/jboss/zbxdb/bin/drivererrors/cx_Oracle.py'> INFO:main:hostname in zabbix: ZBXDB_NDLI_19 INFO:main:connect string : c##cistats/**@//10.1.63.123:1523/ndli19
INFO:main:using sql_timeout : 60s
INFO:main:out_file : /home/jboss/zbxdb_out/zbxdb.ZBXDB_NDLI_19.zbx
INFO:main:site_checks : sap,ebs
INFO:main:connecting to c##cistats/**@//10.1.63.123:1523/ndli19
WARNING:main:(1.1)connection error: [0] DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help for c##cistats@//10.1.63.123:1523/ndli19
INFO:main:connecting to c##cistats/**@//10.1.63.123:1523/ndli19
WARNING:main:(2.1)connection error: [0] DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help for c##cistats@//10.1.63.123:1523/ndli19
INFO:main:connecting to c##cistats/**@//10.1.63.123:1523/ndli19
WARNING:main:(3.1)connection error: [0] DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory". See https://oracle.github.io/odpi/doc/installation.html#linux for help for c##cistats@//10.1.63.123:1523/ndli19
INFO:main:connecting to c##cistats/**@//10.1.63.123:1523/ndli19
The oracle python driver cx_Oracle is found but you seem to be missing the original oracle driver. Normally the express client is good enough.
now what shall i do?? shall I run zbxdb_sender.py manually?
yeah it is missing because i have not installed express client here till now.
Yes, you can try to run zbxdb_sender.py manually. As all is ok, there should be a file in zbxdb_out/ It does not have very interesting data (only connection error, but for zabbix it is data. zbxdb_sender.py by default sends the data to localhost:10051 If your zabbix server[s] are on a different address, put ZABBIX_SERVERS [and ZABBIX_SERVER_PORTS] in your environment (and .bash_profile) to make them point to the correct addresses.
sir there is a file recently created in zbxdb_out
[jboss@TEST-UAT-63-95 ~]$ cd zbxdb_out/ [jboss@TEST-UAT-63-95 zbxdb_out]$ ls -l total 4 -rw-rw-r--. 1 jboss jboss 1415 Apr 15 20:02 zbxdb.ZBXDB_NDLI_19.zbx
Sir you said to configure ZABBIX_SERVERS [and ZABBIX_SERVER_PORTS] in my environment (and .bash_profile)
how should I add this in my bas_profile and env? please help!
[jboss@TEST-UAT-63-95 bin]$ zbxdb_sender.py
Falling back to default logging config
WARNING:main:ZABBIX_SERVERS 127.0.0.1 ZABBIX_SERVER_PORTS 10051
Traceback (most recent call last):
File "/home/jboss/zbxdb/bin/zbxdb_sender.py", line 83, in
shall i edit the script to hardcode the port from localhost to my zabbix server ip but i think its a bad idea please tell me how can i set it in my env and bash_profile.
First: because you ran the script from the zbxdb/bin directory and not from your HOME directory, zbxdb_sender.py can not find the logging config. And yes, you should edit your .bash_profile to contain the correct address for the zabbix server.
Sir I am a bit confused, I ran below command
cd $HOME (cd /home/jboss) zbxdb.py -c etc/zbxdb.ZBXDB_NDLI_19.cfg
so i think i have ran the script from $HOME itself, please correct me if I am wrong
and I am adding these two varaible, will these two will do the work?
ZABBIX_SERVER=
??
_
[jboss@TEST-UAT-63-95 bin]$ zbxdb_sender.py Falling back to default logging config
_
This makes me think you were not in the $HOME directory when running zbxdb_sender.py For zbxdb.py you were correct. You should run zbxdb_sender.py from the same location.
yes, don't forget to export those variables ....
sir, I am running this script again from $HOME and configuring below properties in .bash_profile... Since my zabbix server is on different machine merely giving it's address will start sending data or shall I have to install zabbix proxy at this place and when will the items will shown in host that I created
ZABBIX_SERVER=
sir, I am running this script again from $HOME and configuring below properties in .bash_profile... Since my zabbix server is on different machine merely giving it's address will start sending data or shall I have to install zabbix proxy at this place and when will the items will shown in host that I created
ZABBIX_SERVER=
Sir I added both entries in bash_profile and sourced it again and ran the command from cd $HOME still same issue is coming
ZABBIX_SERVER=
[jboss@TEST-UAT-63-95 ~]$ pwd
/home/jboss
[jboss@TEST-UAT-63-95 ~]$ zbxdb_sender.py
Falling back to default logging config
WARNING:main:ZABBIX_SERVERS 127.0.0.1 ZABBIX_SERVER_PORTS 10051
Traceback (most recent call last):
File "/home/jboss/zbxdb/bin/zbxdb_sender.py", line 83, in
shall I copy logging_sender.json also in $HOME/etc ??
If this vm can reach the zabbix server you do not need a proxy. It just depends on what you want. If you want to be able to do maintenance on your zabbix server without loosing data, you might want to put a proxy as a cache before the server but this is not needed. Don't forget to add the hostname as listed in your etc/zbxdb.ZBXDB_NDLI_19.cfg in zabbix and connect it to the zbxdb template.
Now you ran every step manually. To keep it all running, put zbxdb_starter.py and zbxdb_sender.py in the crontab and make them run every minute. Also make sure that you source the .bash_profile (and .bashrc) before running the commands from the crontab.
yes, copy logging.json.example to etc/logging.json. That will take away the error. (I will fix that error later)
Sir I can connect to zabbibx server from this machine i don't want to mainatain the data hence as you said i don't need proxy in that case.
Yes it worked,
I copied logging_sender.json to $HOME/etc
now I am getting below output
[jboss@TEST-UAT-63-95 ~]$ zbxdb_sender.py 2020-04-15 21:08:06,457_main ZABBIX_SERVERS 127.0.0.1 ZABBIX_SERVER_PORTS 10051 2020-04-15 21:08:06,458_main Logging in /home/jboss/log/zbxdb_sender.log 2020-04-15 21:08:06,458_main zbxdb_sender needs zabbix_sender in PATH
why it is not reading server ip and port from .bash_profille??
Hi again I have an oracle Instance installed on windows host, as far as I see, scripts are in bash and python, How can I monitor oracle on windows with zbxora, Or do you have any idea to monitor that with another tools or scripts? thanks