Show Table of Contents
5.9. 多监控操作
可使用资源代理可支持的多监控操作数配置单一资源。这样就可以每分钟进行一次简单检查,逐渐以较长的间隔执行较深入的检查。
注意
配置多监控操作时,请保证在同一间隔中不能同时执行两个操作。
要为在不同等级中支持更深度检查的资源配置附加监控操作,可添加
OCF_CHECK_LEVEL=n 选项。
例如:如果配置以下
IPaddr2 资源,则会默认创建一个监控操作,即每隔 10 秒执行一次,超时值为 20 秒。
# pcs resource create VirtualIP ocf:heartbeat:IPaddr2 ip=192.168.0.99 cidr_netmask=24 nic=eth2
如果该虚拟 IP 支持深度 10 的不同检查,则以下命令可造成 Pacemaker 除每隔 10 秒执行一次常规虚拟 IP 检查外,还要每隔 60 秒执行更高级的监控检查。(注:不应也以 10 秒为间隔配置附加监控操作。)
# pcs resource op add VirtualIP monitor interval=60s OCF_CHECK_LEVEL=10
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.