[ClusterLabs] Antw: Mail notifications
Ulrich.Windl at rz.uni-regensburg.de
Fri May 15 04:44:14 EDT 2015
>>> Jorge Lopes <jmclopes at gmail.com> schrieb am 15.05.2015 um 10:34 in Nachricht
<CAASpg58Vhyv-TWhgrcWE5Qr0p4cWbgaCeDf-jyQ=ay5WGELmNw at mail.gmail.com>:
> Is it possible to receive mail notifications on change events of the
> cluster? E.g. a resource has been restarted or has been moved.
> I've see the resource type for cluster monitoring that uses crm_mon but
> crm_mon never sends emails.
> I'm using pacemaker 1.1.12 with corosync.
> Any idea?
while sleep 60
crm_mon -1 >/tmp/out
if [ -e /tmp/out.old ]; then
diff -u /tmp/out.old /tmp/out >/tmp.diff
if [ -s /tmp/out.diff ]; then
mailx -s "cluster change detected" to_you </tmp/out.diff
mv /tmp/out /tmp/out.old
## Just invented this script, so you get the idea, I hope...
More information about the Users