danilochilene / pyora Goto Github PK
View Code? Open in Web Editor NEWPython script to monitor Oracle Databases
Home Page: https://bicofino.io/post/monitoring-oracle-with-zabbix/
Python script to monitor Oracle Databases
Home Page: https://bicofino.io/post/monitoring-oracle-with-zabbix/
Hi,
When i try to use the script has a external check, the erro below:
"invalid choice: zabbix"
I change the item on zabbix:
Original.
pyora[{$USERNAME},{$PASSWORD},{$ADDRESS},{$DATABASE},activeusercount]
With my changes:
pyora[ --username {$USERNAME} --password {$PASSWORD} --address {$ADDRESS} --database {$DATABASE} activeusercount]
On the second (using my changes) i receive:
Received value [usage: pyora [-h] [--username USERNAME] [--password PASSWORD] [--address ADDRESS] [--database DATABASE] {dbseqread,tablespace_abs,lastapplarclog,show_users,tablespace_temp,query_rollbacks,indexffs,bufbusywaits,show_asm_volumes,logswcompletion,netresv,db_connect,redowrites,user_status,logonscurrent,fra_use,netroundtrips,directread,directwrite,rollbacks,logfilesync,show_tablespaces_temp,lastarclog,dbfilesize,query_sessions,dbsnglwrite,tblscans,dsksortratio,netsent,commits,version,uptime,query_lock,enqueue,hparsratio,tablespace,check_active,rcachehit,activeusercount,logprllwrite,dbscattread,deadlocks,query_redologs,tblrowsscans,latchfree,check_archive,asm_volume_use,query_sysmetrics,dbprllwrite,show_tablespaces,dbsize,freebufwaits,db_close} ...pyora: error: invalid choice: '--username zabbix --password password--address SERVER --database DATABASE_SERVICE activeusercount' (choose from 'dbseqread', 'tablespace_abs', 'lastapplarclog', 'show_users', 'tablespace_temp', 'query_rollbacks', 'indexffs', 'bufbusywaits', 'show_asm_volumes', 'logswcompletion', 'netresv', 'db_connect', 'redowrites', 'user_status', 'logonscurrent', 'fra_use', 'netroundtrips', 'directread', 'directwrite', 'rollbacks', 'logfilesync', 'show_tablespaces_temp', 'lastarclog', 'dbfilesize', 'query_sessions', 'dbsnglwrite', 'tblscans', 'dsksortratio', 'netsent', 'commits', 'version', 'uptime', 'query_lock', 'enqueue', 'hparsratio', 'tablespace', 'check_active', 'rcachehit', 'activeusercount', 'logprllwrite', 'dbscattread', 'deadlocks', 'query_redologs', 'tblrowsscans', 'latchfree', 'check_archive', 'asm_volume_use', 'query_sysmetrics', 'dbprllwrite', 'show_tablespaces', 'dbsize', 'freebufwaits', 'db_close')] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
But if a go to the terminal, and put the command line, works fine.
I don't know if is Zabbix or the script. Zabbix 2.4
Provide the wrong item value type "number (no plus or minus)" to the trigger function "regexp (ORA)"
Greetings,
thank you for developing this nice app. i configured it following this comments. i checked the zabbix server logs find a issue about this:
pyora[{$USERNAME},{$PASSWORD},{$ADDRESS},{$DATABASE},tablespace_temp,TEMP]" became not supported: Received value [0.08] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
and also i have a question about the value of {$achive} in host config marco side in zabbix web interface, what's the value of this env ? do u have an example ?
thank you.
Hello,
I have the problem below:
./pyora.py --username zabbix --password password --address 172.10.10.20 --database DATABASE dbsize
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
It's on oracle ou pyora?
Thanks
There is the possibility of inserting a sessionpool of connections by cx_oracle, the pyora when it has many items, this dropping the sessions of the bank and causing slowness.
when I call the method I get this error:
0
ORA-00923: FROM keyword not found where expected.
In the SQL-query this method removed the name of columns ('TABLESPACE' and 'USED') and it worked.
Received value [Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/pyora", line 10, in import cx_Oracle File "build/bdist.linux-x86_64/egg/cx_Oracle.py", line 7, in File "build/bdist.linux-x86_64/egg/cx_Oracle.py", line 4, in bootstrap File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1203, in resource_filename self, resource_name File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1715, in get_resource_filename self._extract_resource(manager, self._eager_to_zip(name)) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1745, in _extract_resource self.egg_name, self._parts(zip_path) File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1270, in get_cache_path self.extraction_error() File "/usr/lib/python2.7/dist-packages/pkg_resources/init.py", line 1250, in extraction_error raise errpkg_resources.ExtractionError: Can't extract file(s) to egg cacheThe following error occurred while trying to extract file(s) to the Python eggcache: [Errno 13] Permission denied: '/nonexistent/.cache'The Python egg cache directory is currently set to: /nonexistent/.cache/Python-EggsPerhaps your account does not have write access to this directory? You canchange the cache directory by setting the PYTHON_EGG_CACHE environmentvariable to point to an accessible directory] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
hi, i found a item defination in zabbix template, which is pyora[{$USERNAME},{$PASSWORD},{$ADDRESS},{$DATABASE},query_temp]. buf i can't find the implement in pyora.py file. what is the corresponding sql statement for getting this value. thanks.
Hi,
If I have multiple instance on the same server, how can I use this template ?
Just like title.
I search the code , and not found the "query_temp" section. And I found there is on closed issue. why?
After upgrading debian from 10 to 11 and python from 2 to 3, pyora.py stopped working.
I updated to the latest version and get this error:
python3 pyora.py --username XXXX --password YYYY --address HOST --database XE tablespace SYSTEM
/usr/lib/zabbix/externalscripts/pyora.py:555: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
argnames = inspect.getargspec(method).args[1:]
64
Python is: Python 3.9.2
cx-Oracle 8.3.0
Hello,
I installed according with http://mytara.co.in/Zabbix%20Documents/How%20to%20configure%20Oracle%20prameters%20for%20PRODUCTION(ORACLE%20DC)%20in%20zabbix_files/How%20to%20configure%20Oracle%20prameters%20for%20PRODUCTION(ORACLE%20DC)%20in%20zabbix.htm
When I set UserParameter on zabbix_agent.conf, but zabbix not show pyora.py. [2] No such file or directory
I use template Pyora_ExternalCheck.xml because Pyora.xml import failed Import failed:
Incorrect item key "pyora[{$USERNAME},{$PASSWORD},{$ADDRESS},{$DATABASE},check_archive,{$ARCHIVE}]" provided for trigger expression on "Pyora".
In the moment status triger is /home/zabbix/scripts/pyora: [2] No such file or directory.
Hello,
I'm getting a lot of errors like this one:
"Trigger: Oracle/Database XXXXX is not responding Trigger status: PROBLEM Trigger severity: High Trigger URL:
Item values:
But the database is alive and responding.
Hi Sir,
While importing the template i get the below error :-
Incorrect item key "pyora[{$USERNAME},{$PASSWORD},{$ADDRESS},{$DATABASE},check_archive,{$ARCHIVE}]" provided for trigger expression on "Pyora".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.