galeranotify/README.md

34 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2013-09-26 20:13:12 +02:00
galeranotify
============
Python E-Mail script for use with Galera wsrep\_notify\_cmd
2013-09-26 20:31:36 +02:00
This script immediately generates an E-Mail if Your cluster state changes, so You won't miss a second.
Also duplicates are dropped. Using Galera for instance in combination with commercial backup software like Comvault leads to a whole buch of notifications without a state change.
This is caused by Comvault illegaly LOCKing slave-tables while dumping data out of the cluster. Since the LOCK didn't last too long, the locked slave is pulled back to synced shortly after.
Each locked table causes an E-Mail. Therefore galeranotify remembers its previous state and drops the message if no state change has really happend.
2013-09-26 20:31:36 +02:00
Installation
2013-09-26 20:31:36 +02:00
------
Install it via pip is the easiest way
```
pip install git+https://git.binary-kitchen.de/sprinterfreak/galeranotify
```
2013-09-26 20:31:36 +02:00
- Place the galeranotify.yml under /etc/mysql and configure it.
- Set 'wsrep\_notify\_cmd = galeranotify' in your my.cnf file
- Restart MySql.
2013-09-26 20:31:36 +02:00
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.
2013-09-26 21:23:23 +02:00
Usage:
2013-09-26 21:23:57 +02:00
semodule -i galeranotify.pp
2013-09-26 21:23:23 +02:00
2013-09-26 20:31:36 +02:00
This rule was generated on Centos 6.4 64-bit. It may or may not work for your particular setup.