Python E-Mail script for use with Galera wsrep_notify_cmd
Go to file
unknown 95dda3c4d8 initial commit 2013-09-26 11:31:36 -07:00
LICENSE Initial commit 2013-09-26 11:13:12 -07:00
README.md initial commit 2013-09-26 11:31:36 -07:00
galeranotify.pp initial commit 2013-09-26 11:31:36 -07:00
galeranotify.py initial commit 2013-09-26 11:31:36 -07:00
galeranotify.te initial commit 2013-09-26 11:31:36 -07:00

README.md

galeranotify

Python E-Mail script for use with Galera wsrep_notify_cmd

Why do I need / want this?

Galera makes my life easier with near synchronous replication for MySQL. We have monitoring tools in place, but its nice to get updates in real time about how the cluster is operating. So I wrote galeranotify.

I've been using this on our Percona XtraDB Cluster for quite a while now with no issues.

I hope someone finds it useful.

Set up

  1. Edit galeranotify.py to change the configuration options. They should be pretty straightforward.

  2. Place galeranotify.py in a common location and make sure you and your MySql user have execute permissions.

  3. Manually execute galeranotify.py with several of the options set (check usage) and check to make sure the script executes with no errors and that you receive the notification e-mail.

  4. Set 'wsrep_notify_cmd = ' in your my.cnf file.

  5. Restart MySql.

SELinux

A SELinux policy (galeranotify.pp) is also included that allows the mysql user to connect to a standard remote smtp port (port 25). If you are using an alternate SMTP port (common with SSL), this rule will not work for you.

This rule was generated on Centos 6.4 64-bit. It may or may not work for your particular setup.