zabbix经过orabbix插件监控oracle

什么是orabbix?java

          Orabbix是设计用来为zabbix监控Oracle数据库的插件,它提供多层次的监控,包括可用性和服务器性能指标。
      它提供了从众多Oracle实例采集数据的有效机制,进而提供此信息的监控和性能指标。而后,您能够利用的zabbix的报告功能为收集的全部数据,并提供分析。目前的发行版中包含了一组预先定义的模板,包括从初始部署警报和图形功能。然而,这些能够进行微调,以知足您的需求和数据/监控要求。
web

 

wKiom1PYeBigjHo5AANICWBV8_4495.jpg

它能监控什么?数据库

  1. 数据库版本服务器

  2. 归档日志与生产趋势分析oracle

  3. 触发器,表/过程等命中率ide

  4. 逻辑I / O性能性能

  5. 物理I / O性能spa

  6. PGA插件

  7. SGA设计

  8. 共享池

  9. Sessions

  10. 数据库大小

 

安装配置

Orabbix的下载地址:

http://www.smartmarmot.com/product/orabbix/download/

另外,在安装以前,请确保有jdk环境,用java version来查看版本。

 

1.在/opt目录下新建一个orabbix目录:

#midir-p /opt/orabbix

建议在此目录下,若是放置其余目录稍后须要更改orabbix的启动文件orabbix,启动文件默认写在opt/orabbix目录下

 

2.解压安装文件

#unzip orabbix-1.2.3.zip


3.赋予权限

#chmod -R a+x orabbix/

 

4经过/opt/orabbix/conf/config.props.sample文件建立一个config.props文件:

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

  

5.  编辑orabbix配置文件,具体以下

#vi confi/config.props

#comma separed list of Zabbix servers

ZabbixServerList=ZabbixServer              #此处的ZabbixServer与如下两行开头对应

ZabbixServer.Address=172.16.15.79      #zabbixserver地址

ZabbixServer.Port=10051                     #server的端口

 

#ZabbixServer2.Address=IP_ADDRESS_OF_ZABBIX_SERVER

#ZabbixServer2.Port=PORT_OF_ZABBIX_SERVER

 

#pidFile

OrabbixDaemon.PidFile=./logs/orabbix.pid

#frequency of item's refresh

OrabbixDaemon.Sleep=300

#MaxThreadNumber should be >= than thenumber of your databases

OrabbixDaemon.MaxThreadNumber=100

 

#put here your databases in a commaseparated list

DatabaseList=DB1,DB2                         #数据库名(要与下面对应),多个数据库用逗号隔开

 

#Configuration of Connection pool

#if not specified Orabbis is going to usedefault values (hardcoded)

#Maximum number of active connectioninside pool

DatabaseList.MaxActive=10

#The maximum number of milliseconds thatthe pool will wait

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

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

DatabaseList.MaxWait=100

DatabaseList.MaxIdle=1

 

#define here your connection string foreach database

DB1.Url=jdbc:oracle:thin:@172.16.14.80:1521:media      #经过jbdc链接,确保系统有jdk环境

DB1.User=xxxxx                                 #数据库用户名密码

DB1.Password=xxxxx

#Those values are optionals if notspecified Orabbix is going to use the general values

DB1.MaxActive=10

DB1.MaxWait=100

DB1.MaxIdle=1

DB1.QueryListFile=./conf/query.props #此句指定数据查询文件,可针对不一样数据库,定制不一样的查询文件,默认为./conf/query.props这个文件

 

DB2.Url=jdbc:oracle:thin:@172.16.15.88:1521:media

DB2.User=yyyyyy

DB2.Password=yyyyyy

#Those values are optionals if notspecified Orabbix is going to use the general values

 

DB2.MaxActive=10

DB2.MaxWait=100

DB2.MaxIdle=1

DB2.QueryListFile=./conf/query.props  #此句指定数据查询文件,可针对不一样数据库,定制不一样的查询文件,默认为./conf/query.props这个文件


6.启动程序

直接运行/opt/orabbix/run.sh,这样不容易出错。

固然也能够把程序作成系统服务,方法以下:

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

#/etc/init.d/orabbix start


7.启动成功后,安装配置完成,接下来经过web页面访问直接导入模块便可(模版放置在/opt/orabbix/template下),监控效果图以下:

wKioL1PYf-7yrM7QAAMWICbKZfU019.jpg

wKiom1PYftTBP7ZFAAMhMH5Nq-M280.jpg

wKioL1PYf-7zONF6AAOKoSJ_eBM316.jpg

wKioL1PYh17z3jdRAAM6wwS6pnQ857.jpg

wKiom1PYh2vg0ruNAALMT7WukLI310.jpg

wKioL1PYiIWArOEwAAKpr2a0Djg006.jpg

wKiom1PYh2zznI5-AAKgXZCLdAk388.jpg