sergiotocalini / zabora Goto Github PK
View Code? Open in Web Editor NEWZabbix Agent - Oracle
License: GNU General Public License v3.0
Zabbix Agent - Oracle
License: GNU General Public License v3.0
How to monitor two oracle databases or more on one server?
Can this be done without creating a new user on the system?
[root@ip-10-5-0-14 ~]# zabbix_get -s 10.5.40.12 -p 10050 -k zabora[{$ORACLE_SID},db_metric,'Response Time Per Txn']
ZBX_NOTSUPPORTED: Special characters ", ', ", `, *, ?, [, ], {, }, ~, $, !, &, ;, (, ), <, >, |, #, @, 0x0a" are not allowed in the parameters.
zabibx 3.4
Configured on the host. Imported a template to Zabbix.
Of all the data elements, only the database version works, all the others marked "Not supported", when you hover we get an error:
Value "SQLPlus: Release 12.2.0.1.0 Production Copyright (c) 1982, 2016, Oracle. All rights reserved. Use SQLPlus to execute SQL, PL/SQL and SQLPlus statements. Usage 1: sqlplus -H | -V -H Displays the SQLPlus version and the usage help. -V Displays the SQLPlus version. Usage 2: sqlplus [ [] [{logon | /nolog}] [] ] is: [-AC] [-C ] [-L] [-M ""] [-NOLOGINTIME] [-R ] [-S] -AC Enable Application Continuity. -C Sets the compatibility of affected commands to the version specified by . The version has the form "x.y[.z]". For example, -C 10.2.0 -L Attempts to log on just once, instead of reprompting on error. -M "" Sets automatic HTML or CSV markup of output. The options have the form: {HTML html_options|CSV csv_options} See SQLPlus User's Guide for detailed HTML and CSV options. -NOLOGINTIME Don't display Last Successful Login Time. -R Sets restricted mode to disable SQLPlus commands that interact with the file system. The level can be 1, 2 or 3. The most restrictive is -R 3 which disables all user commands interacting with the file system. -S Sets silent mode which suppresses the display of the SQLPlus banner, prompts, and echoing of commands. is: {[/][@<connect_identifier>] | / } [AS {SYSDBA | SYSOPER | SYSASM | SYSBACKUP | SYSDG | SYSKM | SYSRAC}] [EDITION=value] Specifies the database account username, password and connect identifier for the database connection. Without a connect identifier, SQL*Plus connects to the default database. The AS SYSDBA, AS SYSOPER, AS SYSASM, AS SYSBACKUP, AS SYSDG, AS SYSKM and AS SYSRAC options are database administration privileges. <connect_identifier> can be in the form of Net Service Name or Easy Connect. @[<net_service_name> | [//]Host[:Port]/<service_name>] <net_service_name> is a simple name for a service that resolves to a connect descriptor. Example: Connect to database using Net Service Name and the database net service name is ORCL. sqlplus myusername/mypas
Hello Sergio, we've installed Zabora plugin but we have some problem.
Version: Zabbix 4.0.3
Linux Version: Oracle Linux Server release 7.4
Zabora 1.5.4
We are using Oracle Container Database (CDB) with Pluggable Databases.
If we point to the Container Database, zabora.sh works pretty fine, but we need to monitor the pluggable database. And if we try to point to that the script hangs whitout any result.
Example:
export ORACLE_SID=CONTAINERDB
ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o "${ORACLE_SID}" -s db_version -a 1
Oracle Database 12c Standard Edition Release 12.2.0.1.0 - 64bit Production
export ORACLE_SID=PLUGGABLEDB
ksh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o "${ORACLE_SID}" -s db_version -a 1
hangs with no result
Do you have any idea?
Inside /etc/oratab we have something like:
CONTAINERDB:/oracle12c/app/oracle/product/12c:Y
And if we try to change there CONTAINERDB with PLUGGABLEDB, the script doesn't works.
Thanks in advance for any suggestion.
Trigger after "Oracle: RMAN has problems" keeps triggerd and is not resolved.
for example: There was an issue last weekend, issue resolved and already 2 new RMAN cycled finished completed without errors.
If I manually run the SQL : "db_rman.sql" everything is OK now, output : 0 like expected.
But in zabbix the problem is still there, also latest data shows only the timestamp of the last error happening.
Is this normal behavior and/or how do you handle this?
I implemented the zabora agent on my oracle DB and found out that the tb_size.sql in the package was not giving the right value.
I wrote another script that shows the right value now
SET pagesize 0
SET heading OFF
SET feedback OFF
SET verify OFF
select round((1-sum(nvl(fre.bytes,0))/tot.bytes)*100,2) "pct_used"
from dba_free_space fre,
(select tablespace_name, sum(bytes) bytes
from dba_data_files
group by tablespace_name) tot, dba_tablespaces tbs
where tot.tablespace_name = tbs.tablespace_name
and fre.tablespace_name(+) = tbs.tablespace_name
and fre.tablespace_name = UPPER('&1')
group by tot.bytes/1024, tot.bytes;
QUIT;
Hello Sergio and all.
The Sergio Zabora Project and scripts are ok and work well.
I tried to find my support case here, but I dind´t find.
For the Zabora scripts work in Redhat 7, you need to change this oracle files permissions:
Only after the changes oracle files that Zabbix started to monitor correctly.
Hope this help. Thanks.
Igor Costa
deleted
Hello Sergio, I installed Zabora plugin but I have problem.
Version: Zabbix 4.0.4
Linux Version: CentOS Linux release 7.6.
Deploy:
./deploy_zabbix.sh -u "${xxxxxx}" -p "${xxxxxxx}" -o "${xxxxx}"
ls -l /etc/zabbix/scripts/agentd/zabora/
sql
zabora.conf
zabora.oraenv
zabora.sh
sql:
db_active.sql db_fra.sql db_metric.sql db_uptime.sql template
db_block.sql db_invalid.sql db_redo.sql db_version.sql
db_connection.sql db_jobs.sql db_rman.sql tb_list.sql
db_filesize.sql db_lock.sql db_size.sql tb_size.sql
zabora.conf :
ORACLE_USER="xxxxxx"
ORACLE_PASS="xxxxxxx"
ORACLE_SID="xxxxxx"
zabora.oraenv :
ORACLE_SID=xxxxx
ORACLE_VER=xxxxx
ORACLE_HOME=/xxx/xxx/xxxx/xxxx/xxxx/client_1
ORACLE_BASE=/xxxxx/xxx/xxxx/xxxxx
ORACLE_TERM=xterm
PATH=/usr/bin:/usr/sbin/:$ORACLE_HOME/bin
#NLS_LANG=AMERICAN_AMERICA.UTF8
export ORACLE_SID ORACLE_HOME ORACLE_BASE ORACLE_TERM PATH
/etc/zabbix/zabbix_agentd.d/
userparameter_mysql.conf
zabora.conf
zabora.conf:
UserParameter=zabora[],/etc/zabbix/scripts/agentd/zabora/zabora.sh -o $1 -s $2 -a $3
UserParameter=zabora.discovery[],/etc/zabbix/scripts/agentd/zabora/zabora.sh -o $1 -s $2 -a $3 -j $4
UserParameter=zabora.version,/etc/zabbix/scripts/agentd/zabora/zabora.sh -v short
sh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o $1 -s $2 -a $3
ZBX_NOTSUPPORTED
sh /etc/zabbix/scripts/agentd/zabora/zabora.sh -o $1 -s $2 -a $3 -j $4
ZBX_NOTSUPPORTED
sh /etc/zabbix/scripts/agentd/zabora/zabora.sh -v short
zabora 1.5.4
zabbix_agentd -t oracle[version]
oracle[version] [m|ZBX_NOTSUPPORTED] [Unsupported item key.]
zabbix_get -s 192.168.10.100 -p 10050 -k zabora
ZBX_NOTSUPPORTED
Can you help me or have any idea to solve this problem?
Igor
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.