<div dir="ltr">Gentle Reminder!!<br><br><div class="gmail_quote"><div dir="ltr">---------- Forwarded message ---------<br>From: <strong class="gmail_sendername" dir="auto">Rohit Saini</strong> <span dir="ltr"><<a href="mailto:rohitsaini111.forum@gmail.com">rohitsaini111.forum@gmail.com</a>></span><br>Date: Tue, Oct 9, 2018 at 2:51 PM<br>Subject: Not getting Fencing monitor alerts<br>To:  <<a href="mailto:users@clusterlabs.org">users@clusterlabs.org</a>><br></div><br><br><div dir="ltr"><div dir="ltr">Hi,<div>I am facing issue in getting pcs alerts for fencing resources.</div><div><br></div><div><b>Scenario:</b></div><div>1. Configure the pcs alerts</div><div>2. Add stonith resources (resources are unreachable)</div><div>3. No monitoring alerts received.</div><div><br></div><div><b>Note:</b></div><div>If stonith resources (reachable) are successfully added, then I get pcs alert for monitor link down and up.</div><div><br></div><div><div><b>    ------PCS Alert configuration------</b></div><div>   pcs alert create id=${PCS_ALERT_ID} path=/var/lib/pacemaker/pw_alert.sh                                                                                                             </div><div>    pcs alert recipient add ${PCS_ALERT_ID} value=/var/lib/pacemaker/pw_alert.sh</div><div><br></div><div><span style="white-space:pre-wrap">    </span></div><div><b><span style="white-space:pre-wrap">        </span>------Starting Stonith------</b></div><div>    my_fence_name="fence-xvm-$my_hostname"</div><div>    pcs stonith show $my_fence_name</div><div>    if [ $? -ne 0 ]; then</div><div>        #monitor on-fail is "ignore" which means "Pretend the resource did not fail".</div><div>        #Only alarm will be generated if monitoring link goes down.</div><div>        pcs stonith create $my_fence_name fence_xvm \</div><div>        multicast_address=$my_mcast_addr port=$my_hostport \</div><div>        pcmk_host_list=$my_hostname action=$actionvalue delay=$my_fence_delay \</div><div>        op start interval="100s" on-fail="restart" \</div><div>        op monitor interval="5s" on-fail="ignore"</div><div>        pcs constraint colocation add $my_fence_name with master unicloud-master INFINITY</div><div>        pcs constraint order start $my_fence_name then promote unicloud-master</div><div>        pcs stonith update $my_fence_name meta failure-timeout=3s</div><div>    fi</div><div>    peer_fence_name="fence-xvm-$peer_hostname"</div><div>    pcs stonith show $peer_fence_name</div><div>    if [ $? -ne 0 ]; then</div><div>        pcs stonith create $peer_fence_name fence_xvm \</div><div>        multicast_address=$peer_mcast_addr port=$peer_hostport \</div><div>        pcmk_host_list=$peer_hostname action=$actionvalue delay=$peer_fence_delay \</div><div>        op start interval="100s" on-fail="restart" \</div><div>        op monitor interval="5s" on-fail="ignore"</div><div>        pcs constraint colocation add $peer_fence_name with master unicloud-master INFINITY</div><div>        pcs constraint order start $peer_fence_name then promote unicloud-master</div><div>        pcs stonith update $peer_fence_name meta failure-timeout=3s</div><div>    fi</div><div>                                                                                                                                                                                                </div><div>    pcs property set stonith-enabled=true</div></div><div><br></div><div><br></div><div>Thanks,</div><div>Rohit</div></div></div>
</div></div>