Checking MySQL Events with Nagios

Posted by mwguy on Wed 16 November 2016

You should never ever use MySQL Events. Well that might be an exaggeration. There are probably some good uses for MySQL Events. But if you're using them chances are a developer has decided to use them to do something that should have been included somewhere else in the platform. The biggest problem with MySQL Events is that finding out if they've failed is a hassle.

In comes check_mysql_event.sh. This is a script designed to be ran by Nagios to check the last time a Mysql event has ran on a box. If you're event has failed to complete in the last X amount of time it will alarm you. Is it good? Absolutely not. But it should give you enough data to yell at your developers when they do stuff wrong.

I've tossed the script up on github. Chances are you'll need/want some customization. Feel free to add a pull request (or just straight fork). Enjoy.

tags: Nagios, MySQL