Code Monkey home page Code Monkey logo

galeranotify's Introduction

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.

Added by Emmanuel Quevillon:

In order to keep track of what Galera cluster has operating on, I added the possibility to log cluster operation in a MongoDB database. Edit galeranotify.py to point CONFIGURATION to the appropriate configuration file (check galeranotify.cnf for example).

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 or in your Galera cluster set global wsrep_notify_cmd="<path of galeranotify.py>";

  5. Restart MySql if you edited my.cnf.

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.

Usage:

semodule -i galeranotify.pp

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

galeranotify's People

Contributors

gguillen avatar horkko avatar joshin42 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.