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
转载于:https://blog.51cto.com/xujianghua/1741927