<div dir="ltr"><div><div>Thank you both.<br><br>> Check if you can send mail from the command line with the mail tool. Did you<br>
set up you local mail system properly? Do you use a relay host? What do the<br>
logs<br><br></div><div>Yes, I can send emails form the command line.<br><br><br>> while sleep 60<br>
> do<br>
>    crm_mon -1 >/tmp/out<br>
>    if [ -e /tmp/out.old ]; then<br>
>      diff -u /tmp/out.old /tmp/out >/tmp.diff<br>
>      if [ -s /tmp/out.diff ]; then<br>
>        mailx -s "cluster change detected" to_you </tmp/out.diff<br>
>    fi<br>
>   mv /tmp/out /tmp/out.old<br>> done<br>
><br>
> ## Just invented this script, so you get the idea, I hope...<br><br><br></div><div>Something like this would be my backup plan (using the crontab). But the cluster is alreadly working as event driven and that would be my choice.<br><br><br>This is the resource I have setup:<br><br>primitive ClusterMon-SMTP ocf:pacemaker:ClusterMon \<br>    params user=pacemaker update=30s extra_options="-T <a href="mailto:support@myserver.com">support@myserver.com</a> -F <a href="mailto:no-reply@myserver.com">no-reply@myserver.com</a> -P PACEMAKER -H <a href="http://mail.myserver.com">mail.myserver.com</a>" \<br>    meta target-role=Started \<br>    op monitor interval=10s timeout=60s<br><br>clone ClusterMon-SMTP meta target-role="Started"<br><br></div>My guideline was:<br><a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-notification-email.html">http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-notification-email.html</a><br><br></div><div>No mail is sent.<br></div><div><br></div>But I also have seen this one:<br><div><a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-notification-external.html">http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Pacemaker_Explained/s-notification-external.html</a><br><br></div><div>I was wondering if the 1st approach has been used by anyone. Next, I'll try the second approach.<br><br></div><div>Jorge<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 15, 2015 at 9:44 AM, Ulrich Windl <span dir="ltr"><<a href="mailto:Ulrich.Windl@rz.uni-regensburg.de" target="_blank">Ulrich.Windl@rz.uni-regensburg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>>> Jorge Lopes <<a href="mailto:jmclopes@gmail.com">jmclopes@gmail.com</a>> schrieb am 15.05.2015 um 10:34 in Nachricht<br>
<CAASpg58Vhyv-TWhgrcWE5Qr0p4cWbgaCeDf-jyQ=<a href="mailto:ay5WGELmNw@mail.gmail.com">ay5WGELmNw@mail.gmail.com</a>>:<br>
<div><div class="h5">> Hi<br>
> Is it possible to receive mail notifications on change events of the<br>
> cluster? E.g. a resource has been restarted or has been moved.<br>
><br>
> I've see the resource type for cluster monitoring that uses crm_mon but<br>
> crm_mon never sends emails.<br>
><br>
> I'm using pacemaker 1.1.12 with corosync.<br>
><br>
> Any idea?<br>
<br>
</div></div>while sleep 60<br>
do<br>
    crm_mon -1 >/tmp/out<br>
    if [ -e /tmp/out.old ]; then<br>
      diff -u /tmp/out.old /tmp/out >/tmp.diff<br>
      if [ -s /tmp/out.diff ]; then<br>
        mailx -s "cluster change detected" to_you </tmp/out.diff<br>
    fi<br>
   mv /tmp/out /tmp/out.old<br>
done<br>
<br>
## Just invented this script, so you get the idea, I hope...<br>
<br>
><br>
> Jorge<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>
</blockquote></div><br></div>