<div dir="ltr"><div dir="ltr">Hi Klaus,</div><div dir="ltr">Please see answers below for your queries:</div><div dir="ltr"><br></div><div dir="ltr"><div>Do you have any evidence that monitoring is happening when "resources are unreachable"<br>( == fence_virtd is reachable?) like logs?</div><div><b>[Rohit]</b> Yes, monitoring is happening. I have already tested this. I'm getting pcs alerts accurately when monitoring goes down or up.</div><div><br>I would guess that there is no monitoring unless the fencing-resource is accounted<br>as started successfully. </div><div><b>[Rohit]</b> If that's the case, then I am never going to get pcs alerts. Only way is to check status of resources via fence_xvm or fence_ilo4 to know if resources are reachable or not. Do you agree with me?</div><div><br></div><div>Thanks,</div><div>Rohit <br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 2:03 PM Klaus Wenninger <<a href="mailto:kwenning@redhat.com">kwenning@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_-9104033228008493981moz-cite-prefix">On 10/16/2018 07:43 AM, Rohit Saini
      wrote:<br>
    </div>
    <blockquote type="cite">
      <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" target="_blank">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" target="_blank">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>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Do you have any evidence that monitoring is happening when
    "resources are unreachable"<br>
    ( == fence_virtd is reachable?) like logs?<br>
    I would guess that there is no monitoring unless the
    fencing-resource is accounted<br>
    as started successfully.<br>
    <br>
    Regards,<br>
    Klaus<br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_quote">
          <div dir="ltr">
            <div dir="ltr">
              <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>
      <br>
      <fieldset class="m_-9104033228008493981mimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list: <a class="m_-9104033228008493981moz-txt-link-abbreviated" href="mailto:Users@clusterlabs.org" target="_blank">Users@clusterlabs.org</a>
<a class="m_-9104033228008493981moz-txt-link-freetext" href="https://lists.clusterlabs.org/mailman/listinfo/users" target="_blank">https://lists.clusterlabs.org/mailman/listinfo/users</a>

Project Home: <a class="m_-9104033228008493981moz-txt-link-freetext" href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a>
Getting started: <a class="m_-9104033228008493981moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="m_-9104033228008493981moz-txt-link-freetext" href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div>