Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6275614
  • 博文数量: 2759
  • 博客积分: 1021
  • 博客等级: 中士
  • 技术积分: 4091
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-11 14:14
文章分类

全部博文(2759)

文章存档

2019年(1)

2017年(84)

2016年(196)

2015年(204)

2014年(636)

2013年(1176)

2012年(463)

分类: 系统运维

2016-07-20 06:04:25


Orabbix描述
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.

Orabbix 为zabbix设计的多层次监控插件,可用来监控Oracle数据库的性能、可用性,以及服务的运行指标等。
它提供了有效的机制来获得众多oracle实例的数据,而后将oracle实例数据和性能指标提供给zabbix服务器。zabbix收集所有数据,提供分析结果,如图形、服务级别指标,你可以充分利用这些监控信息。
目前的发行版本中,包含了预定义的模板的集合,初始化部署时囊括了告警、图形功能。这些能够很好地满足你的数据/监控需求。

监控对象

Below are some examples of what Orabbix is capable of monitoring:

  • DB Version (i.e. Validity of 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 Write)
  • Hit Ratio (Hit 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 are caused by contention with the library cache, the area used to store SQL executables for re-use)
  • Sessions / Processessize of database really used space and of Filesize)
  • Sessions (Active Sessions, Inactive Sessions, System Sessions)
  • DBSize/DBFileSize (DBSize size of database really used space and of Filesize)

Orabbix Architecture


安装Orabbix服务端
@Zabbix Server
1、配置JAVA

tar zxf jdk-8u51-linux-x64.tar.gz

mv jdk1.8.0_51/ /usr/local/

export JAVA_HOME=/usr/local/jdk1.8.0_51

exportCLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export PATH=$JAVA_HOME/bin:$PATH

 

source /etc/profile



2、下载

这里下载的版本是orabbix-1.2.3.zip

3、安装Orabbix

su - root

# mkdir /opt/orabbix

# cp orabbix-1.2.3.zip /opt/orabbix/

# unzip orabbix-1.2.3.zip

Archive:  orabbix-1.2.3.zip

   creating: conf/

  inflating: conf/config.props.sample 

  inflating: conf/log4j.properties  

  inflating: conf/log4j.properties.sample 

  inflating: conf/query.props       

  inflating: conf/query.props.sample 

  inflating: conf/query_a.props     

  inflating: conf/query_a_1.props   

  inflating: conf/query_b.props     

   creating: doc/

  inflating: doc/CHANGELOG.txt      

  inflating: doc/Orabbix_Install_v0.6.pdf 

  inflating: doc/gpl.txt            

   creating: init.d/

  inflating: init.d/orabbix         

  inflating: install.cmd            

   creating: lib/

  inflating: lib/commons-codec-1.4.jar 

  inflating: lib/commons-dbcp-1.4.jar 

  inflating: lib/commons-lang-2.5.jar 

  inflating: lib/commons-logging-1.1.1.jar 

  inflating: lib/commons-pool-1.5.4.jar 

  inflating: lib/hsqldb.jar         

  inflating: lib/log4j-1.2.15.jar    

  inflating: lib/ojdbc6.jar         

  inflating: orabbix-1.2.3.jar      

  inflating: orabbix.exe            

  inflating: orabbixw.exe           

  inflating: run.bat                

  inflating: run.sh                 

   creating: template/

  inflating: template/Orabbix_export_full.xml 

  inflating: template/Orabbix_export_graphs.xml 

  inflating: template/Orabbix_export_items.xml 

  inflating: template/Orabbix_export_triggers.xml 

  inflating: uninstall.cmd          

  inflating: conf/query - Copy.props  


 

# cp ./conf/config.props.sample conf/config.props

# cp init.d/orabbix /etc/init.d/

# chmod 755 /etc/init.d/orabbix 

# chkconfig orabbix on




4、配置orabbix,注意红色部分要匹配。

# vim ./conf/config.props

 

ZabbixServerList=ZabbixServer

ZabbixServer.Address=10.0.6.102

ZabbixServer.Port=10051

OrabbixDaemon.PidFile=./logs/orabbix.pid

OrabbixDaemon.Sleep=300

OrabbixDaemon.MaxThreadNumber=100

DatabaseList=PROM

DatabaseList.MaxActive=10

DatabaseList.MaxWait=100

DatabaseList.MaxIdle=1

PROM.Url=jdbc:oracle:thin:@10.1.1.84:1521:prom

PROM.User=ZABBIX

PROM.Password=zabbix

PROM.MaxActive=10

PROM.MaxWait=100

PROM.MaxIdle=1

PROM.QueryListFile=./conf/query.props


其中,jdbc连接格式如下
jdbc:oracle:thin:@::


Orabbix客户端配置
@Oracle DB
1、创建zabbix用户

- 1 Create User

CREATE USER ZABBIX

 IDENTIFIED BY "zabbix"

 DEFAULT TABLESPACE SYSTEM

 TEMPORARY TABLESPACE TEMP

 PROFILE DEFAULT

 ACCOUNT UNLOCK;

 

 – 2 Roles for ZABBIX

 GRANT CONNECT TO ZABBIX;

 GRANT RESOURCE TO ZABBIX;

 ALTER USER ZABBIX DEFAULT ROLE ALL;

 

 – 3 System Privileges for ZABBIX

 GRANT 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;



2、oracle 11g需要执行如下,添加acl列表

 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;



启动Orabbix,并配置zabbix展示
@Zabbix Server
1、启动orabbix

# service  orabbix start


查看状态

# service  orabbix status


查看日志

# tail -f /opt/orabbix/logs/orabbix.log 

 2016-07-07 21:01:17,597 [main] INFO  Orabbix - maxIdleTime=1800000ms

 2016-07-07 21:01:17,597 [main] INFO  Orabbix - poolTimeout=100

 2016-07-07 21:01:17,597 [main] INFO  Orabbix - timeBetweenEvictionRunsMillis=-1

 2016-07-07 21:01:17,597 [main] INFO  Orabbix - numTestsPerEvictionRun=3

 2016-07-07 21:01:18,471 [main] INFO  Orabbix - Connected as ZABBIX

 2016-07-07 21:01:18,474 [main] INFO  Orabbix - --------- on Database -> promotio

 2016-07-07 21:01:20,679 [pool-1-thread-1] INFO  Orabbix - Done with dbJob on database PROM QueryList elapsed time 2161 ms

 2016-07-07 21:02:18,552 [pool-1-thread-2] INFO  Orabbix - Done with dbJob on database PROM QueryList elapsed time 11 ms

 2016-07-07 21:03:20,413 [pool-1-thread-3] INFO  Orabbix - Done with dbJob on database PROM QueryList elapsed time 1849 ms


2、zabbix中添加监控主机
导入orabbix模板Orabbix_export_full






添加主机


注意,Host name一定要和orabbix配置文件中的DatabaseList相同。



为Host添加模板,模板名字为Template_Oracle。



而后将监控图形加到Screens中




转载请注明:
十字螺丝钉
http://blog.chinaunix.net/uid/23284114.html

QQ:463725310
E-MAIL:houora#gmail.com(#请自行替换为@)


阅读(1676) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~