Zabbix 3.2.6 Monitoring Oracle database through Orabbix

Source: Internet
Author: User
Tags sessions

I. BACKGROUND

The company's business uses the Oracle database, because multiple occurrences of the table space can not be found in time, each time is the business group of Personnel notification processing, so that the DBA side is relatively passive, so the boss asked to monitor the remaining size of the table space and when the remaining hours can be timely alarm. Just came out of the solution is to write a script to get the table space data, through the script using expect automatically enter the password to the Oracle user and then log on to the database query data back to Zabbix_server. However, due to the script run time about 12 seconds, Zabbix get data always time out, in the online search found Zabbix plug-in Orabbix, the principle is through the Orabbix Landing is monitored host Oracle database, query data. Personal view is very useful, including custom monitoring items. The only trouble is that you need to add each database server IP, database user, and password in the configuration file.

Ii. introduction of Orabbix

Orabbix is a plug-in designed to monitor Oracle's database for Zabbix, providing multiple levels of monitoring, including metrics for availability and server performance. It provides an effective mechanism for capturing from many Oracle instances, providing monitoring and performance metrics for this information. You can then take advantage of the Zabbix reporting feature for all data collected and provide analysis. A pre-defined set of templates is included in the current release, including alarms and graphical features from the initial deployment. However, these can be fine-tuned to meet your volume requirements and data/monitoring requirements.

650) this.width=650; "title=" Orabbix_architecture.png "alt=" Wkiom1nmx8zdj5gyaak4cqzvph0185.png "src=" https:// S1.51cto.com/wyfs02/m01/07/9a/wkiom1nmx8zdj5gyaak4cqzvph0185.png "/>

Three, Orabbix function

  • DB Version (i.e. validity of the package)

  • Archiving (Archive log production with trend analysis)

  • Event Waits (Files I/O, single block read, multi-block read, direct path read, sqlnet Messages, Control file I/O, Log writ E

  • Hit Ratio (hits Ratio on Triggers, Tables/procedures, SQL area, Body)

  • Logical I/O (Server performance on Logical I/O of:current read, consistent read, Block change)

  • Physical I/O (Redo writes, DataFile writes, datafile Reads)

  • Pga

  • SGA (in particular; Fixed Buffer, Java pool, Large pool, Log Buffer, Shared Poolm buffer Cache)

  • Shared Pool (pool Dictionary Cache, pool free Memory, Library Chache, SQL area, MISC.)

  • Pin hit Ratio (Oracle library cache pin is caused by contention and the library cache, the area used to store SQL execut Ables for re-use)

  • Sessions/processes

  • Sessions (Active Sessions, Inactive Sessions, System Sessions)

  • Dbsize/dbfilesize (dbsize size of database really used space and of Filesize)

Iv. installation configuration of Orabbix

In fact, Orabbix only need to install on a single server, I chose to install on Zabbix server, of course, the above JDK is for Orabbix service, because Orabbix is an Oracle client to find data in Oracle, and pass it on to Zabbix.

The installation of the JDK can be part of my other blog posts, the installation is very simple, here is no longer described.

1. Download Orabbix

It is recommended to use my modified software for http://down.51cto.com/data/2337373.

Unzip ORABBIX-1.2.3.ZIPMV Orabbix-1.2.3/usr/local/orabbix

2. Adjust the configuration file

CD/USR/LOCAL/ORABBIXCP Init.d/orabbix/etc/init.d/chmod +x/etc/init.d/orabbixchmod +x/usr/local/orabbix/run.sh

3. Create a Database account

First we need to create an account on the monitored Oracle for ZABBIX data acquisition, executed in Oracle's Sqlplus.

CREATE USER zabbixidentified by "Zabbix" DEFAULT tablespace systemtemporary tablespace tempprofile defaultaccount UNLOCK; #2 Roles for zabbixgrant CONNECT to ZABBIX; GRANT RESOURCE to ZABBIX; ALTER USER ZABBIX DEFAULT ROLE all, #5 System privileges for zabbixgrant SELECT any TABLE to ZABBIX; GRANT CREATE SESSION to ZABBIX; GRANT SELECT any DICTIONARY to ZABBIX; GRANT UNLIMITED tablespace to ZABBIX; GRANT SELECT any DICTIONARY to ZABBIX;

If our database is Oracle 11g, we also need to execute the following statement.

exec dbms_network_acl_admin.create_acl (ACL = ' resolve.xml ', description = ' resolve ACL ', principal = ' ZABBIX ', Is_grant = true, privilege = ' resolve '); exec dbms_network_acl_admin.assign_acl (ACL = ' resolve.xml ', host = > ' * '); commit;

4, Configuration Config.props

Config.props is a Orabbix configuration file with a path of/usr/local/orabbix/conf.

CP Config.props.sample Config.props

Open the configuration file with the following modified content:

#comma  separed list of zabbix serverszabbixserverlist= zabbixserver1zabbixserver1.address=10.0.0.14zabbixserver1.port=10051#pidfileorabbixdaemon.pidfile=./logs/ Orabbix.pid#frequency of item ' S refreshorabbixdaemon.sleep=300#maxthreadnumber should  be >= than the number of your  Databasesorabbixdaemon.maxthreadnumber=100#put here your databases in a comma  separated listdatabaselist=10.0.2.64,10.0.2.63#configuration of connection pool#if  not specified Orabbis is going to use default values  ( hardcoded) #Maximum  number of active connection inside pooldatabaselist.maxactive =10#the maximum number of milliseconds that the pool will wait  # (when there are no available connections)  for a connection to be returned  #before  throwing an exception, or <=  0 to wait indefinitely. DatabaseList.MaxWait=100DatabaseList.MaxIdle=1#define  here your connection string for each database10.0.2.64.url=jdbc:oracle:thin:@ 10.0.2.64:1521:unicode10.0.2.64.user=zabbix10.0.2.64.password=zabbix#those values are optionals  if not specified Orabbix is going to use the general  Values10.0.2.64.maxactive=1010.0.2.64.maxwait=10010.0.2.64.maxidle=110.0.2.64.querylistfile=./conf/query.props #define  here your connection string for each database10.0.2.63.url=jdbc:o racle:thin:@10.0.2.63:1521:orcl10.0.2.63.user=zabbix10.0.2.63.password=zabbix#those values are  optionals if not specified orabbix is going to use the  general values10.0.2.63.maxactive=1010.0.2.63.maxwait=10010.0.2.63.maxidle=110.0.2.63.querylistfile=./conf/query.props 

remark:

    • Zabbixserverlist: Can be set multiple, with "," to split;

    • Databaselist: You can set up multiple monitored Oracle database servers, split with ",", and the name is consistent with the host name in the Zabbix server interface, and the settings referenced in the configuration file are subject to that name.

V. Launch of Orabbix Service

Service Orabbix Start

650) this.width=650; "title=" qq20170928112334.jpg "alt=" wkiol1nma1rrrsihaacc7o2egn4532.jpg "src=" https:// S3.51cto.com/wyfs02/m01/a6/4d/wkiol1nma1rrrsihaacc7o2egn4532.jpg "/>

Vi. Configuring Zabbix to add monitoring

1. Import templates

The templates are all imported under the template directory of the package.

650) this.width=650; "title=" qq20170928112746.jpg "alt=" wkiom1nmblbdmm_qaabvhhb0i_4279.jpg "src=" https:// S2.51cto.com/wyfs02/m02/07/9b/wkiom1nmblbdmm_qaabvhhb0i_4279.jpg "/>

Configuration-->templates-->import

650) this.width=650; "title=" qq20170928112628.jpg "alt=" wkiom1nmbd-r8w6xaabvwyketms677.jpg "src=" https:// S3.51cto.com/wyfs02/m01/07/9b/wkiom1nmbd-r8w6xaabvwyketms677.jpg "/>

2. Oracle Host Add monitoring template

650) this.width=650; "style=" Float:none; "title=" qq20170928113122.jpg "alt=" wkiom1nmbycwumqjaadc59ll6qg847.jpg "src = "Https://s2.51cto.com/wyfs02/M00/07/9C/wKiom1nMbYCwuMQJAADc59lL6qg847.jpg"/>


650) this.width=650; "style=" Float:none; "title=" qq20170928113151.jpg "alt=" wkiol1nmbugjiyp4aacqd0nky2y676.jpg "src = "Https://s1.51cto.com/wyfs02/M00/A6/4D/wKioL1nMbUGjIYP4AACqd0nKy2Y676.jpg"/>

Vii. Verification

650) this.width=650; "style=" Float:none; "title=" qq20170928113344.jpg "alt=" wkiom1nmbi_athgsaafa5wqf_yg297.jpg "src = "Https://s3.51cto.com/wyfs02/M01/07/9C/wKiom1nMbi_AThgSAAFa5wQf_yg297.jpg"/>


650) this.width=650; "style=" Float:none; "title=" qq20170928113403.jpg "alt=" wkiol1nmbfdrsxg-aadsx4hn-gk292.jpg "src = "Https://s3.51cto.com/wyfs02/M00/A6/4D/wKioL1nMbfDRsXg-AADSx4hn-gk292.jpg"/>


650) this.width=650; "style=" Float:none; "title=" qq20170928113420.jpg "alt=" wkiom1nmbjdhi08gaaeb_dbzobq023.jpg "src = "Https://s3.51cto.com/wyfs02/M02/07/9C/wKiom1nMbjDhi08gAAEB_dBzObQ023.jpg"/>


650) this.width=650; "style=" Float:none; "title=" qq20170928113449.jpg "alt=" wkiol1nmbfccykisaac4hyyxacw013.jpg "src = "Https://s3.51cto.com/wyfs02/M00/A6/4D/wKioL1nMbfCCykisAAC4HyyXAcw013.jpg"/>




Reference Document: Http://www.smartmarmot.com/wiki/index.php?title=Orabbix



650) this.width=650; "title=" qrcode_for_gh_891f5ff6ec4e_258.jpg "alt=" wkiol1nmbieqv2anaacmb4cvfn4478.jpg "src=" Https://s2.51cto.com/wyfs02/M02/A6/4D/wKioL1nMbieQV2ANAACmb4CVfN4478.jpg "/>

This article is from the "Operation and maintenance bit record" blog, please make sure to keep this source http://wzlinux.blog.51cto.com/8021085/1969377

Zabbix 3.2.6 Monitoring Oracle database through Orabbix

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.