最近在调整线上监控准备把Oracle加入到监控中去,然后看了下Nagios的监控oracle的插件check_oracle发现可以监控的项目还不少,因为有监控主机,所以需要远程监控oracle。check_oracle的插件帮助如下:
check_oracle --tns <Oracle Sid or Hostname/IP address> check_oracle --db <ORACLE_SID> check_oracle --login <ORACLE_SID> check_oracle --cache <ORACLE_SID> <USER> <PASS> <CRITICAL> <WARNING> check_oracle --tablespace <ORACLE_SID> <USER> <PASS> <TABLESPACE> <CRITICAL> <WARNING> check_oracle --oranames <Hostname> check_oracle --help check_oracle --version由于调整只需要监控oracle进程,所以整个监控比较简单。
1,加入oracle监控的主机commonds
command[check_oracle]=/usr/local/nagios/libexec/check_oracle --db lcartdg
3,加入监控主机的service。由于之前已经添加了监控host,暂时不需要添加
define service{ use generic-service host_name luckcart_db01,luckcart_dbbak01 service_description Check_oracle check_command check_nrpe!check_oracle max_check_attempts 3 normal_check_interval 10 retry_check_interval 5 check_period 24x7 notification_interval 3 notification_period 24x7 notification_options w,u,c,r contact_groups admins }
service ngios restart