当前位置:  数据库>oracle

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

    来源: 互联网  发布时间:2017-04-25

    本文导语:  Orabbix无法获取Oracle DB Size和DB Files Size的解决方法 这几天在研究Orabbix时发现在Zabbix中无法获取DB Size和DB Files Size的大小,后来发现问题出在/opt/orabbix/conf/query.props文件的配置上: 因为最新的Orabbix 1.2.3版本在解压安装后,默认的qu...

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相关信息见 专题页面



    
 
 

您可能感兴趣的文章:

 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Zabbix的Oracle监控插件 orabbix


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,