#put here your databases in a comma separated list
DatabaseList=rac1 ##被监控oracle服务器名称需要和主机新增host的hostname一致
#Configuration of Connection pool
#if not specified Orabbis is going to use default values (hardcoded) #Maximum number of active connection inside pool DatabaseList.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=100 DatabaseList.MaxIdle=1
#define here your connection string for each database
rac1.Url=jdbc:oracle:thin:@192.168.6.237:1521:racdb1 ##被监控oracle jdbc连接 rac1.User=zabbix ##被监控oracle用户 rac1.Password=zabbix ##被监控oracle密码
#Those values are optionals if not specified Orabbix is going to use the general values
rac1.MaxActive=10 rac1.MaxWait=100 rac1.MaxIdle=1
rac1.QueryListFile=./conf/query.props
DB2.Url=jdbc:oracle:thin:@server2.domain.example.com:
DB2.Password=zabbix_password
DB2.QueryListFile=./conf/query.props
DB3.Url=jdbc:oracle:thin:@server3.domain.example.com:
DB3.Password=zabbix_password
DB3.QueryListFile=./conf/query.props
##在被监控oracle服务器上创建所需用户密码,被授予相应的权限;嫌麻烦的话直接用dba用户 oracle@rac1:/home/oracle||-->>sqlplus / as sysdba
sys@RACDB>create user zabbix identified by \
User created.
sys@RACDB>grant connect,resource to zabbix;
Grant succeeded.
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_$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_$sysem_event to zabbix; sys@RACDB>exit
##创建启动脚本
root@rac1:/opt/orabbix-->cp /opt/orabbix/init.d/orabbix /etc/init.d/orabbix root@rac1:/opt/orabbix-->chmod +x /etc/init.d/orabbix
root@rac1:/opt/orabbix/conf-->service orabbix start ##启动服务 Starting Orabbix service:
root@rac1:/opt/orabbix/conf-->ps -ef|grep orabbix
ountry=US -Dlog4j.configuration=./conf/log4j.properties -cp
4.jar:lib/commons-dbcp-1.4.jar:lib/commons-lang-2.5.jar:lib/commons-logging-1.jar:lib/commons-pool-1.5.4.jar:lib/hsqldb.jar:lib/log4j-1.2.15.jar:lib/ojdjar:.:./orabbix-1.2.3.jar com.smartmarmot.orabbix.bootstrap props
##查看orabbix后台日志如下表示成功鸟
root@rac1:/opt/orabbix/logs-->tail orabbix.log
2014-12-18 16:57:06,943 [pool-1-thread-16] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 272 ms
2014-12-18 16:58:44,434 [pool-1-thread-17] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 37749 ms
2014-12-18 16:59:06,726 [pool-1-thread-18] INFO Orabbix - Done with dbJob on
root 560 1 18 16:21 pts/1 00:00:01 java -Duser.language=en -Duser.c
lib/commons-codec-1.
1.1.
bc6.
start ./conf/config.
database rac1 QueryList elapsed time 25 ms
2014-12-18 17:01:10,076 [pool-1-thread-19] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 63341 ms
2014-12-18 17:01:10,644 [pool-1-thread-20] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 3898 ms
2014-12-18 17:02:40,830 [pool-1-thread-21] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 34034 ms
2014-12-18 17:03:06,870 [pool-1-thread-22] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 52 ms
2014-12-18 17:04:15,900 [pool-1-thread-23] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 9075 ms
2014-12-18 17:05:06,863 [pool-1-thread-24] INFO Orabbix - Done with dbJob on database rac1 QueryList elapsed time 30 ms 从日志看,大概是一分钟执行一次取数; 看下示例图:
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库zabbix(3)在线全文阅读。
相关推荐: