<div dir="ltr">Hi Ulrich,<div><br></div><div>The ClusterMon OCF must be configured with the extra_options parameter:</div><div><br></div><div><div><font face="monospace, monospace"># Sample configuration</font></div><div><font face="monospace, monospace"># ================================</font></div><div><font face="monospace, monospace"># primitive ClusterMon ocf:pacemaker:ClusterMon \</font></div><div><font face="monospace, monospace">#        params user=&quot;root&quot; update=&quot;30&quot; extra_options=&quot;-E /path/to/pcmk_snmp_helper.sh -e 192.168.1.2&quot; \</font></div><div><font face="monospace, monospace">#        op monitor on-fail=&quot;restart&quot; interval=&quot;10&quot;</font></div></div><div><br></div><div><br></div><div>Have you looked at the <a href="https://github.com/ClusterLabs/pacemaker/blob/master/extra/pcmk_snmp_helper.sh">pcmk_snmp_helper.sh</a>  script that Florian CROUZAT created?   It provides a good example of how to get the information provided when an external program is executed by crm_mon.  The parameters are passed as Environment variables, similar to how Resource Agents work in Pacemaker:</div><div><br></div><div><font face="monospace, monospace">CRM_notify_recipient<br></font></div><div><font face="monospace, monospace">CRM_notify_node<br></font></div><div><font face="monospace, monospace">CRM_notify_rsc<br></font></div><div><font face="monospace, monospace">CRM_notify_task<br></font></div><div><font face="monospace, monospace">CRM_notify_desc<br></font></div><div><font face="monospace, monospace">CRM_notify_status<br></font></div><div><font face="monospace, monospace">CRM_notify_rc<br></font></div><div><font face="monospace, monospace">CRM_notify_target_rc</font><br></div><div><br></div><div>regards,</div><div>-Brett Moser</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 11, 2015 at 6:46 AM, Ulrich Windl <span dir="ltr">&lt;<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de" target="_blank">Ulrich.Windl@rz.uni-regensburg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">&gt;&gt;&gt; Riley &lt;<a href="mailto:riley@on.net.nz">riley@on.net.nz</a>&gt; schrieb am 11.05.2015 um 12:05 in Nachricht<br>
&lt;<a href="mailto:55507ECD.7050706@on.net.nz">55507ECD.7050706@on.net.nz</a>&gt;:<br>
<span class="">&gt; Ulrich,<br>
&gt;            well I guess &#39;man crm_mon&#39; does not tell you very much, but<br>
&gt; the ClusterMon resource uses crm_mon, and chapter 7 of the Pacemaker<br>
&gt; documentation,<br>
&gt; <a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained/" target="_blank">http://clusterlabs.org/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained/</a><br>
&gt; s-notification-external.html,<br>
&gt; documents the CRM_notify_* environment variables.<br>
<br>
</span>Actually I&#39;m more confused than before now ;-)<br>
<br>
So there is a ClusterMon OCF RA that is started by the cluster, and that monitor starts &quot;crm_mon&quot; to periodically dump the configuration to a HTML file. If all I can get is a text dump of the configuration, it&#39;s rather ridiculous.<br>
<br>
I fail to see the connection to the argument to option &quot;-E&quot; in the documentation you are referring to, and section 7.3 (The example) really lacks an example how such variables look like (and what to do with them).<br>
<br>
Regards,<br>
Ulrich<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; (No arguments/parameters are passed to the program that is called via<br>
&gt; it&#39;s command line, everything is through the environment variables)<br>
&gt;&gt; ...<br>
&gt;&gt;&gt; I have set up a virtual test environment of three nodes running CentOS<br>
&gt;&gt;&gt; 6.6 and am having trouble getting a &quot;crm_mon -E &quot; script called *at all*<br>
&gt;&gt;&gt; when anything changes in the cluster (resource killed, node killed,<br>
&gt;&gt;&gt; resource moved, etc.).<br>
&gt;&gt; Never heard of that option, but when considering the documentation, I&#39;m not<br>
&gt; much surprised if it doesn&#39;t work as one might expect:<br>
&gt;&gt;        -E, --external-agent=value<br>
&gt;&gt;               A program to run when resource operations take place.<br>
&gt;&gt;<br>
&gt;&gt; This leaves a LOT of room for expectations. ;-)<br>
&gt;&gt;<br>
&gt;&gt; What should be a typical use case? Will the program have any parameters?<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt; <a href="http://clusterlabs.org/mailman/listinfo/users" target="_blank">http://clusterlabs.org/mailman/listinfo/users</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://clusterlabs.org/mailman/listinfo/users" target="_blank">http://clusterlabs.org/mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br></div>