cqlinx 发表于 2019-1-13 15:13:43

nagios监控oralce数据库的表空间大小

  一、安装nrpe
  本处使用直接解压的方式来安装的nrpe

  二、配置nrpe服务
  1.修改libexec文件夹中的check_oracle

  在其中添加如下项

ORACLE_HOME=/oradata/Oracle/product/11.2.0
PATH=$PATH:/oradata/Oracle/product/11.2.0/bin  2.在nrpe.conf中添加如下项

command=/usr/local/nagios/libexec/check_oracle --tablespace 监听名 数据库用户 数据库密码 表名称 CRITICAL报警大小 waring报警大小  重启完nrpe会报如下错误

cannot connect to adpdb. ORA-12154: TNS:could not resolve the connect identifier
specified (DBD ERROR: OCIServerAttach)  解决办法:

  出现这个问题,是权限不足,将nagios加入到oinstall组,并重启nrpe
# usermod -a -G oinstall nagios
# killall nrpe
# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d  现在就可以监控oracle了



页: [1]
查看完整版本: nagios监控oralce数据库的表空间大小