前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >OCF_CHECK_LEVEL参数详解

OCF_CHECK_LEVEL参数详解

作者头像
党志强
发布2020-02-11 11:06:34
5780
发布2020-02-11 11:06:34
举报
文章被收录于专栏:敏而好学敏而好学

   关于pacemaker配置中用到的OCF_CHECK_LEVEL参数,没理解太明白,查了资料也没弄清,有熟悉的同学请帮忙留言解释,谢谢啦。

   官方给的关于OCF_CHECK_LEVEL参数的相关说明如下:

引自:Pacemaker 1.1 Configuration Explained

5.7.2.2. Multiple Monitor Operations

Provided no two operations (for a single resource) have the same name and interval you can have asmany monitor operations as you like. In this way you can do a superficial health check every minute and progressively more intense ones at higher intervals.

To tell the resource agent what kind of check to perform, you need to provide each monitor with a different value for a common parameter. The OCF standard creates a special parameter called OCF_CHECK_LEVEL for this purpose and dictates that it is "made available to the resource agent without the normal OCF_RESKEY prefix".

Whatever name you choose, you can specify it by adding an instance_attributes block to the op tag. Note that it is up to each resource agent to look for the parameter and decide how to use it.

Example 5.8. An OCF resource with two recurring health checks, performing different levels of checks - specified via OCF_CHECK_LEVEL.

代码语言:javascript
复制
<primitive id="Public-IP" class="ocf" type="IPaddr" provider="heartbeat">
<operations>
<op id="public-ip-health-60" name="monitor" interval="60">
<instance_attributes id="params-public-ip-depth-60">
<nvpair id="public-ip-depth-60" name="OCF_CHECK_LEVEL" value="10"/>
</instance_attributes>
</op>
<op id="public-ip-health-300" name="monitor" interval="300">
<instance_attributes id="params-public-ip-depth-300">
<nvpair id="public-ip-depth-300" name="OCF_CHECK_LEVEL" value="20"/>
</instance_attributes>
</op>
</operations>
<instance_attributes id="params-public-ip">
<nvpair id="public-ip-level" name="ip" value="1.2.3.4"/>
</instance_attributes>
</primitive>
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2014-04-17 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档