Orabbix无法获取Oracle DB Size和DB Files Size的解决方法

WBOY
풀어 주다: 2016-06-07 17:13:19
원래의
1162명이 탐색했습니다.

Orabbix无法获取Oracle DB Size和DB Files Size的解决方法,这几天在研究Orabbix时发现在Zabbix中无法获取DB Size和DB Files Size

Orabbix无法获取Oracle DB Size和DB Files Size的解决方法

这几天在研究Orabbix时发现在Zabbix中无法获取DB Size和DB Files Size的大小,,后来发现问题出在/opt/orabbix/conf/query.props文件的配置上:

因为最新的Orabbix 1.2.3版本在解压安装后,默认的query.props文件内没有配置这两个选项的检测,所以需要手动加上,分别在此文件中两个地方加入配置,具体如下:

1. 在“QueryList=”的最后加上“,dbfilesize,dbsize”,注意要用逗号格开;

2. 另外加上,dbfilesize,dbsize的检测语句,如下:

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

dbsize.Query=SELECT to_char(sum(  NVL(a.bytes/1024/1024/10 - NVL(f.bytes/1024/1024/10, 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')


休改后结果如下:

QueryList=archive,audit,dbblockgets,dbconsistentgets,dbhitratio,dbphysicalread,dbversion,hitratio_body,hitratio_sqlarea,hitratio_table_proc, \
lio_current_read,locks,maxprocs,maxsession,miss_latch,pga_aggregate_target, pga,phio_datafile_reads,phio_datafile_writes,phio_redo_writes,pinhitratio_body,pinhitratio_sqlarea,pinhitratio_table-proc,pinhitratio_trigger, \pool_dict_cache,pool_free_mem,pool_lib_cache,pool_misc,pool_sql_area,procnum,session_active,session_inactive,session,session_system,sga_buffer_cache, \ sga_fixed,sga_java_pool,sga_large_pool,sga_log_buffer,sga_shared_pool,tbl_space,userconn,waits_controfileio,waits_directpath_read, \ waits_file_io,waits_latch,waits_logwrite,waits_multiblock_read,waits_singleblock_read,hitratio_trigger,lio_block_changes,lio_consistent_read,waits_other,

waits_sqlnet,users_locked,uptime,dbfilesize,dbsize


DataGuardPrimaryQueryList=dg_error,dg_sequence_number
DataGuardStandbyQueryList=dg_sequence_number_stby
RmanQueryList=rman_check_status

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

dbsize.Query=SELECT to_char(sum(  NVL(a.bytes/1024/1024/10 - NVL(f.bytes/1024/1024/10, 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')

更多Oracle相关信息见Oracle 专题页面 ?tid=12

원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
최신 이슈
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿