VCS做detail monitor?
有个oracle资源组使用VCS自带的oracle监控的,出现这样的问题,oracle没有open,结果资源组却能online
据说VCS提供detail monitor接口可以自己实现监控,不知道怎样调用这个接口,怎样实现
有没有大神这样做过的?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
本帖最后由 godymoon 于 2011-04-27 23:36 编辑
The included script can be used by entering the path %VCSHOME%\\bin\\Oracle\\check.sql.
在VCS网站http://sfdoccentral.symantec.com ... e_agent/ch01s04.htm查到这个:
How the agent makes Oracle highly available
The Veritas Cluster Server agent for Oracle continuously monitors the Oracle database and listener processes to verify they function properly.
The agent provides the following levels of application monitoring:
•
Primary or Basic monitoring
This mode has Process check and Health check monitoring options. With the default Process check option, the agent verifies that the Oracle and listener processes are present in the process table. Process check cannot detect whether processes are in a hung or stopped states.
The Oracle agent provides functionality to detect whether the Oracle resource was intentionally taken offline. The agent detects graceful shutdown for Oracle 10g and later. When an administrator brings down Oracle gracefully, the agent does not trigger a resource fault even though Oracle is down. The value of the type-level attribute IntentionalOffline attribute and the value of the MonitorOption attribute must be set to 1 to enable Oracle agent's intentional offline functionality.
For example, with the intentional offline functionality, the agent faults the Oracle resource if there is an abnormal termination of the instance. The agent reports the Oracle resource as offline if you gracefully bring down Oracle using commands like shutdown, shutdown immediate, shutdown abort, or shutdown transactional.
•
Secondary or Detail monitoring
In this mode, the agent runs a perl script that executes commands against the database and listener to verify their status.
The agent detects application failure if the monitoring routine reports an improper function of the Oracle or listener processes. When this application failure occurs, the Oracle service group fails over to another node in the cluster. Thus the agent ensures high availability for the Oracle services and the database.
回复 1# godymoon
http://space.itpub.net/58054/viewspace-621798
Detail monitoring for an Oracle resource verifies whether a database is ready for transactions by performing an update transaction against a table within the database. The update action is taken by the two scripts,SqlTest.pland
SimpleTest.pl, provided with the Veritas High Availability Agent for Oracle. The scripts are available under the directory /opt/VRTSagents/ha/bin/Oracle/. Both scripts update the timestamp to monitor the database.
To set up detail monitoring for Oracle
1 Make the VCS configuration writable:
haconf -makerw
2 Freeze the service group to avoid automated actions by VCS caused by an incomplete reconfiguration:
hagrp -freeze service_group
3 Log on as an Oracle user.
su - <Owner>
4 Set the environment variables for ORACLE_HOME and ORACLE_SID.
export ORACLE_HOME=<Home>
export ORACLE_SID=<Sid>
5 Start the svrmgrl or sqlplus utility to set up a database table:
$ORACLE_HOME/bin/svrmgrl
or
$ORACLE_HOME/bin/sqlplus /nolog
6 As the database administrator, issue the following statements at thesvrmgrl or sqlplus prompt to create the test table:
connect / as sysdba
create user <User>
identified by <Pword>
default tablespace USERS
temporary tablespace TEMP
quota 100K on USERS;
grant create session to <User>;
create table <User>.<Table> ( tstamp date );
insert into <User>.<Table> (tstamp) values (SYSDATE);
7 To test the database table for use, do the following:
disconnect
connect <User>/<Pword>
update <User>.<Table> set ( tstamp ) = SYSDATE;
select TO_CHAR(tstamp, ’MON DD, YYYY HH:MI:SS AM’)
from <User>.<Table>;
exit
8 Enable the detail monitoring for the Oracle resource using the following VCS
commands:
hares -modify OracleResource User User
hares -modify OracleResource Pword Pword
hares -modify OracleResource Table Table
hares -modify OracleResource MonScript. "./bin/Oracle/SqlTest.pl"
hares -modify OracleResource DetailMonitor 1
haconf -dump -makero
hagrp -unfreeze service_group
Enabling and disabling detail monitoring for Oracle
To enable detail monitoring
◆ Set the DetailMonitor attribute to 1.
hares -modify OracleResource DetailMonitor 1
To disable detail monitoring
◆ Set the DetailMonitor attribute to 0.
hares -modify OracleResource DetailMonitor 0
本帖最后由 godymoon 于 2012-09-05 00:13 编辑
-- 配置detail monitoring for Oracle
在Ora_oracle 资源的配置项里面,要配置参数
User 用户
Pword 密码
Table veritas_update
MonSctipt ./bin/Oracle/SimpleTest.pl
DetailMonitor 1
在 Oracle 的配置项里面,配置 Oracle 实例监控间隔:
MonitorInterval 60
FaultOnMonitorTimeouts 2
MonitorTimeout 20
本帖最后由 godymoon 于 2011-12-30 22:16 编辑
慎用detail monitor
LZ强悍,UP