码迷,mamicode.com
首页 > 数据库 > 详细

ZABBIX之ORACLE监控

时间:2016-06-02 00:55:18      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:

1,安装JDK

 
2,安装orabbix
wget http://www.smartmarmot.com/downloads/orabbix-1.2.3.zip
mkdir /opt/orabbix
mv orabbix-1.2.3.zip /opt/orabbix
cd /opt/orabbix
unzip orabbix-.1.2.3.zip
 
3, 授权
chmod +x /opt/orabbix/run.sh
chmod +x /opt/orabbix/init.d/orabbix
 
cp /opt/orabbix/conf/config.props.sample config.props
 
4,配置config.props
cat /opt/orabbix/conf/config.props |grep -v "#"            这里仅取没有注释的。
ZabbixServerList=ZabbixServer          #zabbix名称
  
ZabbixServer.Address=192.168.0.119     #zabbix服务端的IP地址
ZabbixServer.Port=10051                #zabbix服务端的端口
  
  
OrabbixDaemon.PidFile=./logs/orabbix.pid
OrabbixDaemon.Sleep=300
OrabbixDaemon.MaxThreadNumber=100
  
DatabaseList=pfs-dev               #这个名称可以随便起,但是必须跟监控的主机名保持一致。
  
DatabaseList.MaxActive=10
DatabaseList.MaxWait=100
DatabaseList.MaxIdle=1
  
twstcptest.com.Url=jdbc:oracle:thin:@192.168.32.48:1521:pfstest  #这里主要是通过JDBC来连接客户端的。rdcms主要是数据库的实例名称。在客户端可以通过select instance_name from v$instance来得到实例的名称。
twstcptest.com.User=zabbix      #数据库用户
twstcptest.com.Password=zabbix  #数据库用户密码
twstcptest.com.MaxActive=10
twstcptest.com.MaxWait=100
twstcptest.com.MaxIdle=1
twstcptest.com.QueryListFile=./conf/query.props
 
5, oracle数据库权限配置
su - oracle       
export ORACLE_SID=pfstest
sqlplus / as sysdba
 
create user zabbix identified by "zabbix" default tablespace system temporary tablespace temp profile default account unlock;
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_$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;
 
6, 启动orabbix
/opt/orabbix/run.sh
ps aux|grep orabbix
 

ZABBIX之ORACLE监控

标签:

原文地址:http://www.cnblogs.com/tankt101/p/5551579.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!