<html><head><base href="x-msg://43/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 24, 2010, at 10:05 AM, Simpson, John R wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Greetings all,</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">     First, my compliments to the Pacemaker and Corosync developers.  I’ve been trying out Pacemaker for the past few months, and (especially from the command line) I’ve found building and managing Pacemaker-based clusters more intuitive and flexible than RHCS.</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">     Is there any way to generate SNMP traps and/or email notifications when a resource is moved or a node is STONITH’d?  </span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">     Using the Pacemaker resource agent ClusterMon to run crm_mon I receive the start, stop, and monitor notifications I expect, but there are no specific notifications when a resource is moved or a node is killed.  I’d like to send up a giant red flag when one of these major events occurs, rather than having to derive it from start/stop/monitor alerts (i.e. all the resources usually hosted on node01 suddenly started and were monitored on node02 – node01 must have been stonith’d).  I’m using the external/ssh stonith agent for lab tests, if that is a factor.</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">     I’m using the following ClusterMon configuration and Pacemaker / Corosync / SNMP versions:</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">primitive Monitor-Cluster ocf:pacemaker:ClusterMon \</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">        params htmlfile="/var/www/html/rlb-cluster-monitor.html" \</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">        params pidfile="/var/run/rlb-cluster-monitor.pid" \</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">        params extra_options="--mail-host=outbound.msg.reyrey.net:25<span class="Apple-converted-space"> </span><a href="mailto:--mail-from=john_simpson@reyrey.com" style="color: blue; text-decoration: underline; ">--mail-from=john_simpson@reyrey.com</a><span class="Apple-converted-space"> </span><a href="mailto:--mail-to=john_simpson@reyrey.com" style="color: blue; text-decoration: underline; ">--mail-to=john_simpson@reyrey.com</a><span class="Apple-converted-space"> </span>--snmp-traps=10.205.1.18" \</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">        op start interval="0" timeout="90s" \</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">        op stop interval="0" timeout="100s"</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">pacemaker-libs-devel-1.0.8-3.el5</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">pacemaker-libs-1.0.8-3.el5 is</span></font></div></div></div></span></blockquote><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">pacemaker-1.0.8-3.el5</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">corosynclib-1.2.0-1.el5</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">corosync-1.2.0-1.el5</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">corosynclib-devel-1.2.0-1.el5</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">net-snmp-libs-5.3.2.2-7.el5_4.2</span></font></div><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">net-snmp-5.3.2.2-7.el5_4.2</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Best regards,</span></font></div><p class="MsoNormal" style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "> </span></font></p><div style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; margin-top: 0in; margin-bottom: 0.0001pt; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">John</span></font></div><p style="margin-right: 0in; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="#002878" face="Arial Black"><span style="font-size: 10pt; font-family: 'Arial Black'; color: rgb(0, 40, 120); letter-spacing: 1pt; ">John Simpson<span class="Apple-converted-space"> </span></span></font><br><font size="2" color="#5f5f5f" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: rgb(95, 95, 95); letter-spacing: 1pt; ">Senior Software Engineer, I. T. Engineering and Operations</span></font></p></div></div></span></blockquote></div><br><div>Ironically, pacemaker does not provide self-monitoring facilities, at least I wasn't able to find anything usable.</div><div>I strongly suggest you to disable --mail-to feature of crm_mon, because you will induce a DoS attack on your mail server. </div><div>You will be flooded with pretty much useless e-mails (<a href="http://developerbugs.linux-foundation.org/show_bug.cgi?id=2313">http://developerbugs.linux-foundation.org/show_bug.cgi?id=2313</a>) </div><div>Also crm_mon is not usable with nagios at the moment (<a href="http://developerbugs.linux-foundation.org/show_bug.cgi?id=2344">http://developerbugs.linux-foundation.org/show_bug.cgi?id=2344</a>)</div><div>Your best bet is either write a cron script or a "Dummy" derived resource agent that would parse 'crm resource status' output or</div><div> create a MailTo resource for each single leaf node and accompanied collocation/ordering constraints.</div><div><br></div><div>If there is another "native" way to get nagios-like notifications to my pager, I would be happy to know them as well.</div><div><br></div><div>Vadym</div><div><br></div><div><br></div></body></html>