Product SiteDocumentation Site

10.3.5. Monitoring Multi-State Resources

The normal type of monitor actions are not sufficient to monitor a multi-state resource in the Master state. To detect failures of the Master instance, you need to define an additional monitor action with role="Master".

Important

It is crucial that every monitor operation has a different interval!
This is because Pacemaker currently differentiates between operations only by resource and interval; so if eg. a master/slave resource has the same monitor interval for both roles, Pacemaker would ignore the role when checking the status - which would cause unexpected return codes, and therefore unnecessary complications.

Example 10.7. Monitoring both states of a multi-state resource

<master id="myMasterRsc">
   <primitive id="myRsc" class="ocf" type="myApp" provider="myCorp">
    <operations>
     <op id="public-ip-slave-check" name="monitor" interval="60"/>
     <op id="public-ip-master-check" name="monitor" interval="61" role="Master"/>
    </operations>
   </primitive>
</master>