免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5022 | 回复: 5
打印 上一主题 下一主题

VCS做detail monitor? [复制链接]

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-04-27 23:04 |只看该作者 |倒序浏览
有个oracle资源组使用VCS自带的oracle监控的,出现这样的问题,oracle没有open,结果资源组却能online
据说VCS提供detail monitor接口可以自己实现监控,不知道怎样调用这个接口,怎样实现

有没有大神这样做过的?

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
2 [报告]
发表于 2011-04-27 23:22 |只看该作者
本帖最后由 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.

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
3 [报告]
发表于 2011-04-27 23:42 |只看该作者
回复 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

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
4 [报告]
发表于 2011-05-27 23:13 |只看该作者
本帖最后由 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

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
5 [报告]
发表于 2011-07-17 13:36 |只看该作者
本帖最后由 godymoon 于 2011-12-30 22:16 编辑

慎用detail monitor

论坛徽章:
0
6 [报告]
发表于 2011-10-14 15:15 |只看该作者
LZ强悍,UP
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP