什么是orabbix?
Orabbix是设计用来为zabbix监控Oracle数据库的插件,它提供多层次的监控,包括可用性和服务器性能指标。
它提供了从众多Oracle实例采集数据的有效机制,进而提供此信息的监控和性能指标。然后,您可以利用的zabbix的报告功能为收集的所有数据,并提供分析。目前的发行版中包含了一组预先定义的模板,包括从初始部署警报和图形功能。然而,这些可以进行微调,以满足您的需求和数据/监控要求。
它能监控什么?
- 数据库版本
- 归档日志与生产趋势分析
- 触发器,表/过程等命中率
- 逻辑I / O性能
- 物理I / O性能
- PGA
- SGA
- 共享池
- Sessions
- 数据库大小
安装配置
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下),监控效果图如下:
|