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

Orabbix 添加dbsize和dbfilesize监控

时间:2016-02-14 22:27:32      阅读:572      评论:0      收藏:0      [点我收藏+]

标签:orabbix   dbsize   dbfilesize   

1.修改配置文件/opt/orabbix/conf/query.props

a) QueryList添加一下内容

...,dbfilesize,dbsize

b) 添加查询语句

dbfilesize.Query=select to_char(sum(bytes/1024/1024/1024), ‘FM99999999999999990‘) retvalue from dba_data_files


dbsize.Query=SELECT to_char(sum(  NVL(a.bytes/1024/1024/1024 - NVL(f.bytes/1024/1024/1024, 0), 0)), ‘FM99999999999999990‘) retvalue \

FROM sys.dba_tablespaces d, \

(select tablespace_name, sum(bytes) bytes from dba_data_files group by tablespace_name) a, \

(select tablespace_name, sum(bytes) bytes from dba_free_space group by tablespace_name) f \

WHERE d.tablespace_name = a.tablespace_name(+) AND d.tablespace_name = f.tablespace_name(+) \

AND NOT (d.extent_management like ‘LOCAL‘ AND d.contents like ‘TEMPORARY‘)

2.重启orabbix服务

/etc/init.d/orabbix stop

/etc/init.d/orabbix start


本文出自 “IT运维” 博客,请务必保留此出处http://xujh1986.blog.51cto.com/5550987/1741927

Orabbix 添加dbsize和dbfilesize监控

标签:orabbix   dbsize   dbfilesize   

原文地址:http://xujh1986.blog.51cto.com/5550987/1741927

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