What's this dbAlerter stuff?
Database Alerter = Something wrong with your DB? Well now you know what!
After suffering at the hands of external monitoring tools I decided to write something myself. dbAlerter is currently written in Python to keep things simple and lightweight, the aim is to provide comprehensive monitoring with zero (ideally minimal) impact to the database's function.
Features
- Database operational check through common queries (CREATE, INSERT, UPDATE, DELETE, DROP)
- Error Log monitor
- Excessive Slow Query notification
- Replication status notification
- Daily Statistics
- E-Mail Notification
Requirements
Supported Databases
Installation
Configuration File Format
The configuration file for dbAlerter is pretty much identical to the my.cnf format. Based on RFC 822 the configuration file consists of sections, led by a "[dbAlerter]" header and followed by "name: value" entries as outlined below.
Configuration File Header [dbAlerter] |
||
Name |
Value |
Description |
hostname |
localhost |
MySQL Hostname |
port |
3306 |
MySQL Port |
username |
monitor |
MySQL User requires the privileges ( |
password |
monitor |
MySQL Password |
smtp_server |
localhost |
SMTP Server to send mail |
from_address |
Address that notifications should originate from |
|
to_address |
Address to send notifications to |
|
check_interval |
20 |
Check interval in seconds |
dbalerter_log |
/var/log/dbAlerter.log |
Output log for dbAlerter daemon |
Example Configuration (dbalerter.config)
[dbAlerter] hostname=localhost port=3306 username=monitor password=monitor smtp_server=localhost from_address=dbAlerter@mydomain.org to_address=me@mydomain.org check_interval=20 dbalerter_log=/var/log/dbAlerter.log
MySQL dbAlerter Account Creation
GRANT SELECT, REPLICATION CLIENT, SHOW DATABASES, SUPER ON *.* TO 'mysqluser'@'localhost' IDENTIFIED BY 'dbAlerter_password'; GRANT CREATE, INSERT, DELETE, DROP ON dbAlerter.* TO 'mysqluser'@'localhost' IDENTIFIED BY 'dbAlerter_password';
Download
Coming soon - check out the source if you can't wait
Help improve dbAlerter
The best way to improve dbAlerter is to try it out and let me know what works, what doesn't and what's missing. You can do that using the Issue Tracker - it's easy.







