Product SiteDocumentation Site

5.8.3. Disabling a Monitor Operation

The easiest way to stop a recurring monitor is to just delete it. However there can be times when you only want to disable it temporarily. In such cases, simply add disabled="true" to the operation's definition.
Example 5.10. Example of an OCF resource with a disabled health check

  <primitive id="Public-IP" class="ocf" type="IPaddr" provider="heartbeat">
    <operations>
     <op id="public-ip-check" name="monitor" interval="60s" disabled="true"/>
    </operations>
    <instance_attributes id="params-public-ip">
       <nvpair id="public-ip-addr" name="ip" value="1.2.3.4"/>
    </instance_attributes>
  </primitive>


This can be achieved from the command-line by executing
cibadmin -M -X ‘<op id="public-ip-check" disabled="true"/>'
Once you've done whatever you needed to do, you can then re-enable it with
cibadmin -M -X ‘<op id="public-ip-check" disabled="false"/>'