- 论坛徽章:
- 0
|
本帖最后由 royleong 于 2011-09-06 17:42 编辑
#########################################################################################################################################################
問題:
nagios:監控機
oracle16:被監控機
[root@nagios ~]# sqlplus nagios/redhat@ABC
SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 6 17:23:25 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> show parameter stream;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
streams_pool_size big integer 0
SQL> <===== 證明可連的
[oracle@oracle16 ~]$ /usr/local/nagios/libexec/check_oracle_health --connect ABC --username nagios --password redhat --mode sga-data-buffer-hit-ratio
OK - SGA data buffer hit ratio 100.00% | sga_data_buffer_hit_ratio=100.00%;98:;95:
[root@nagios ~]# /usr/local/nagios/libexec/check_oracle_health --connect ABC --username nagios --password redhat --mode sga-data-buffer-hit-ratio
OK - SGA data buffer hit ratio 100.00% | sga_data_buffer_hit_ratio=100.00%;98:;95:
命令都能查到訊息, 在 Firefox 上看不到
sga-data-buffer-hit-ratio
CRITICAL 09-06-2011 16:21:04 0d 0h 6m 38s 3/3 CRITICAL - cannot connect to ABC. ERROR OCIEnvNlsCreate. Check ORACLE_HOME (Linux) env var or PATH (Windows) and or NLS settings, permissions, etc.
[root@nagios ~]# vim /usr/local/nagios/etc/objects/10.0.0.16.cfg
define service{
use generic-service
host_name oracle16
service_description check_oracle_sga-data-buffer-hit-ratio
check_command check_oracle_health!ABC!nagios!redhat!sga-data-buffer-hit-ratio
} # ^ 把它們的 "check_nrpe!" 去掉
[root@nagios ~]# service nagios reload
[oracle@oracle16 ~]$ /usr/local/nagios/libexec/check_oracle_health --connect ABC --username nagios --password redhat --mode sga-data-buffer-hit-ratio
OK - SGA data buffer hit ratio 100.00% | sga_data_buffer_hit_ratio=100.00%;98:;95:
[root@nagios ~]# /usr/local/nagios/libexec/check_oracle_health --connect ABC --username nagios --password redhat --mode sga-data-buffer-hit-ratio
OK - SGA data buffer hit ratio 100.00% | sga_data_buffer_hit_ratio=100.00%;98:;95:
命令都能查到訊息, 在 Firefox 上看不到
sga-data-buffer-hit-ratio
CRITICAL 09-06-2011 17:13:28 0d 0h 10m 24s 3/3 CRITICAL - cannot connect to ABC. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
當 "10.0.0.16.cfg" 把它的 "check_nrpe!" 去掉, Firefox 的訊息都變了, 一樣看不到訊息
請各方朋友指教
謝謝
#########################################################################################################################################################
之前論壇的某人 http://bbs.chinaunix.net/viewthread.php?tid=1930654 也有類似情況, 但好像也没解!, 小弟差這步就能監控Oracle了, 請各位指教一下
感恩 |
|