zabbix3.0.2 through Orabbix to monitor oracle11g enhanced version of the detailed process ____oracle

Source: Internet
Author: User
Tags chmod commit memory usage sessions log4j

-->orabbix Brief Description

Orabbix is a Zabbix plug-in tool for monitoring Oracle database performance by installing the data on the client on the monitored server and passing it to the Zabbix server side, and then by calling the graphical display. Has the following features:

(1), database version

(2), archive documents

(3), waiting for events (such as file I/O, single block read, multiple read, direct read, sqlnet message, control file I/O, log write, etc.)

(4), Hitratio (monitor hit ratio trigger, table/stored procedure, sqlarea,body)

(5), logical I/O (current read operation, continuous read operation, block change)

(6), PGA

(7), SGA (fixed buffer, Javapool,large pool,log buffer,shared pool,buffer Cache)

(8), Physical I/O (rewrite operation, data file write operation, data file read operation)

9, Sharepool (pooldictionary Cache, Pool free Memory, the Library cache,sql area, Misc.)

10. Pin Hit Ratio (monitor Hit Ratio on Trigger, Tables/procedures, Sqlarea,body)

11, Session/processes (monitor Sessions and processes)

12, session (Activesession, Inactive Sessions, System session)

1, download and install Jdk8

#下载地址

http://download.csdn.net/detail/mchdba/9515973

# Decompression Installation

TAR-XVF jdk-8u45-linux-x64.tar.gz-c/USR/LIB/JVM

2, the Oracle monitoring account is created and executed in Oracle's sqlplus window:

To create a monitoring user statement:

CREATE USER Zabbix identified by ys_zb_0418 default tablespace USERS temporary tablespace TEMP Profiles DEFAULT account UN LOCK;

GRANT ALTER session to Zabbix;
GRANT CREATE session to Zabbix;
GRANT CONNECT to Zabbix;
ALTER USER Zabbix DEFAULT role all;
GRANT SELECT on v_$instance to Zabbix;
GRANT SELECT on dba_users to Zabbix;
GRANT SELECT on v_$log_history to Zabbix;
GRANT SELECT on V_$log to Zabbix;
GRANT SELECT on V_$parameter to Zabbix;
GRANT SELECT on SYS. Dba_audit_session to Zabbix;
GRANT SELECT on V_$lock to Zabbix;
GRANT SELECT on Dba_registry to Zabbix;
GRANT SELECT on V_$librarycache to Zabbix;
GRANT SELECT on V_$sysstat to Zabbix;
GRANT SELECT on V_$parameter to Zabbix;
GRANT SELECT on V_$latch to Zabbix;
GRANT SELECT on V_$pgastat to Zabbix;
GRANT SELECT on V_$sgastat to Zabbix;
GRANT SELECT on V_$librarycache to Zabbix;
GRANT SELECT on v_$process to Zabbix;
GRANT SELECT on Dba_data_files to Zabbix;
GRANT SELECT on Dba_temp_files to Zabbix;
GRANT SELECT on Dba_free_space to Zabbix;
GRANT SELECT on v_$system_event to Zabbix;
GRANT SELECT on V_$locked_object to Zabbix;
GRANT SELECT on dba_objects to Zabbix;
GRANT SELECT on dba_tablespaces to Zabbix;
GRANT SELECT on v_$session to Zabbix;

The original address of this blog is: http://blog.csdn.net/mchdba/article/details/51366790, declined to reprint.

If it is a oracle11g version of the database, you also need to perform the following statement to open ACL access control, otherwise some content will not display correctly during monitoring (for example, database version, database file size, etc.) Also, there will be error prompts in the Orabbix log display. :

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

#--Execution process

sql> exec dbms_network_acl_admin.create_acl (ACL => ' resolve.xml ',description=> ' resolve ACL ', principal => ' ZABBIX ', is_grant => true, Privilege => ' resolve ');

Pl/sqlprocedure successfully completed.

sql> exec dbms_network_acl_admin.assign_acl (ACL => ' resolve.xml ', host => ' * ');

Pl/sqlprocedure successfully completed.

Sql> commit;

Commit complete.

Sql>

3, install deployment Orabbix

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

Download

Mkdir/usr/local/orabbix

Cd/usr/local/orabbix

wget Http://nchc.dl.sourceforge.net/project/orabbix/orabbix-1.2.3.zip

Installation

Unzip Orabbix-1.2.3.zip

chmod +x run.sh

CP init.d/orabbix/etc/init.d/

Sed-i ' S#/opt/orabbix#orabbix=/usr/local/orabbix#g '/etc/init.d/orabbix

chmod +x/etc/init.d/orabbix

Sed-i ' S#java#/usr/lib/jvm/jdk1.8.0_45/bin/java#g '/usr/local/orabbix/run.sh

4, configure CONFIG. Props:

Orabbix all the configuration files are in the Conf directory, you need to copy the default profile config.props.sample and then modify and configure it.

[Root@zabbix_serv_121_12 conf]# Vim Config.props

Zabbixserver2.port=port_of_zabbix_server

#pidFile

Orabbixdaemon.pidfile=./logs/orabbix.pid

#frequency of item ' s refresh

orabbixdaemon.sleep=300

#MaxThreadNumber should be >= than the number of your databases

orabbixdaemon.maxthreadnumber=100

#put here your databases in a comma separated list

# DATABASELIST=DB1,DB2,DB3

Databaselist=azure_yueworldoracle_crm_3_90,azure_earth_dbm1_3_111,db3

#Configuration Connection Pool

#if not specified Orabbis are going to use default values (hardcoded)

#Maximum number of active connection inside pool

databaselist.maxactive=10

#The maximum number of milliseconds that the pool would wait

# (when there are no available connections) for a connection to be returned

#before throwing an exception, or <= 0 to-wait indefinitely.

databaselist.maxwait=100

Databaselist.maxidle=1

#define here your connection string for each database

#DB1. Url=jdbc:oracle:thin:@192.167.3.90:1521:db1

Azure_yueworldoracle_crm_3_90.url=jdbc:oracle:thin:@192.167.3.90:1521:powerdes

Azure_yueworldoracle_crm_3_90.user=zabbix

azure_yueworldoracle_crm_3_90.password=ys_zb_0418

#Those values are optionals if not specified Orabbix are going to use the general values

azure_yueworldoracle_crm_3_90.maxactive=10

azure_yueworldoracle_crm_3_90.maxwait=100

Azure_yueworldoracle_crm_3_90.maxidle=1

Azure_yueworldoracle_crm_3_90.querylistfile=./conf/query.props

Azure_earth_dbm1_3_111.url=jdbc:oracle:thin:@192.167.3.111:1521:earth_m1

Azure_earth_dbm1_3_111.user=zabbix

azure_earth_dbm1_3_111.password=ys_zb_0418

Azure_earth_dbm1_3_111.querylistfile=./conf/query.props

PS: Note that databaselist=db1 refers to the name of the monitored server, which is to be consistent with the name of the machine in the Zabbix server interface, and that the subsequent references in the configuration file are based on that name.

DB1. url=jdbc:oracle:thin:@ 192.167.3.90:1521:powerdes Specifies the connection information for the monitored server (for example, using JDBC connections, The server address is 192.167.3.90,oracle port is 1521,powerdes refers to the instance name of the database)

5, Start Orabbix service

# start Orabbix

[Root@zabbix_serv_121_12 conf]# Service Orabbix start

Starting Orabbix Service:

[Root@zabbix_serv_121_12 conf]#

# View the initiated Orabbix process

[Root@zabbix_serv_121_12 conf]# PS aux |grep Orabbix

Root 1259 0.3 0.6 12112256 203324 pts/1 Sl 16:02 0:13/usr/lib/jvm/jdk1.8.0_45/bin/java-duser.language=en-dus ER.COUNTRY=US-DLOG4J.CONFIGURATION=./CONF/LOG4J.PROPERTIES-CP lib/commons-codec-1.4.jar:lib/ commons-dbcp-1.4.jar:lib/commons-lang-2.5.jar:lib/commons-logging-1.1.1.jar:lib/commons-pool-1.5.4.jar:lib/ Hsqldb.jar:lib/log4j-1.2.15.jar:lib/ojdbc6.jar:.:./orabbix-1.2.3.jar com.smartmarmot.orabbix.bootstrap start./ Conf/config.props

Root 6108 0.0 0.0 103256 844 pts/1 s+ 17:04 0:00 grep Orabbix

[Root@zabbix_serv_121_12 conf]#

6, interface to import Oracle template files

Import template XML file, during which problem log 1 is encountered. E:\software\Oracle\install_11.2.0.4\pic2\01.png, 02.png


on the Oracle server, join the Orabbix Monitor template 03.png, enter the host-> Templates-> Link new Templates-> Select, go to the new interface select group-> Templates_oracle, then tick to the left name below and click the Select button.

then click the Add button in the link New templates box and click the Update button below, as shown in 04.png:

7, add Linux base monitoring on Oracle templates

This Oracle template has only Oracle monitoring and is not available for basic monitoring of Oracle servers such as disk, Io, and so on, and we need to introduce Linux monitoring on this Oracle template. Enter the all templates-> template_oracle-> linked templates->link new Templates Marquee, click the Select button and select Template OS L in the Inside interface Inux template, and then exit, click Add button, add to linked templates inside, and then click Update button Updates completed, you can see this Oracle template items have been increased to 108, graphs has increased to 19, Triggers also increased to 390, and the result is shown in the following figure E:\software\Oracle\install_11.2.0.4\pic2\05.png

8, view the Oracle Monitor section display picture

From monitoring-> Graphs-> Group (select your own group)-> Host (select your own Oracle server)->graps, see a list of many monitor charts for Oracle servers, as shown in the following figure E:\ Software\oracle\install_11.2.0.4\pic2\06.png as follows:

SGA Memory Usage Monitor chart, E:\software\Oracle\install_11.2.0.4\pic2\07.png:


Hitratio Hit rate monitor chart, E:\software\Oracle\install_11.2.0.4\pic2\08.png:



9, problem record

Import failed

Details

· Host Group "Templates" already exists.

Workaround: Change the <group>TEMPLATES</group> in Orabbix's 4 XML into <group>templates_oracle</group> Then re-import import.

Reference article:Http://www.smartmarmot.com/wiki/index.php/Orabbix


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.