MySQL Health Checker is a simple scripts that provide MySQL and OS metrics, slow queries and MySQL errors in one report.
- Key MySQL metrics highlights (check the report)
- Shows recent MySQL error log entries
- Shows Top 5 Slow Queries from MySQL slow log
- Complete MySQL instance information collection with –first-look mode
- Command-line style. Cron compatible.
- Open source. Available on GitHub and SourceForge
What it does?
It’s calculating MySQL instance parameters like read/write rate, indicating metrics related to potential performance issues like full table scans, temporary tables creation, locks and some storage-level IO-stats.
Yet another script. Why?
Idea was to automate daily DBA routine checks and see what’s going on on MySQL servers without having to log in and enter same commands manually day-by-day. Working with customers systems year by year I come up the set of metrics that in addition to monitoring will indicate current MySQL and system state and allow to detect possible issues before they become a problem.
Report includes basic but important system-wide metrics like free space and memory consumption and amount of per-interface network errors (in netstat output). MySQL side starts with recent entries from MySQL error log, list of important MySQL statistics along with load statistics and query cache metrics (where enabled) and most important – slow query report generated using great tool called pt-query-digest from Percona Toolkit. This report will be created automatically if you have slow query log enabled and non-empty.
Complete data collection mode
This tool also allows you to collect most of the available MySQL performance counters, OS & MySQL configuration and database schema details by running in –first-look mode. Results stored as set of files. Useful for performance troubleshooting.
Usage and download
This tool can run from shell or send a report via email (good for cron). Please feel free to download this tool from GitHub or SourceForge. Installation and configuration instructions are here. If you have any concerns regarding your MySQL servers health please feel free to drop me a note.
If you like this tool – please share it!