<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 10/16/2018 07:43 AM, Rohit Saini
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+ZsWTX_2kY7UDePG3CW1tHJ4SwVpBN2=oQL4ah7js0yfrfY=A@mail.gmail.com">
      <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"
                moz-do-not-send="true">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"
              moz-do-not-send="true">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"
cite="mid:CA+ZsWTX_2kY7UDePG3CW1tHJ4SwVpBN2=oQL4ah7js0yfrfY=A@mail.gmail.com">
      <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="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="https://lists.clusterlabs.org/mailman/listinfo/users">https://lists.clusterlabs.org/mailman/listinfo/users</a>

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