What tools do you use to monitor the health of your MySQL server instance? Are they for free or commercial?
locked by HopelessN00b Dec 5 '14 at 5:03
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.
Mysql has a free one called Mysql Administrator which is part of the mysql GUI tools package.
Mysql Administrator connection documentation.
There is also the Mysql Enterprise Monitor which has many more monitoring features. You can monitor Mysql on other servers see faq question 7.
As basic as it is, I've used:
$ watch -n1 "mysqladmin processlist -u root -pYouWillNeverGuessThis"
This provides me with a list of connections, users, hosts, databases, commands etc, updated every second. It's a real-time "who's doing what right now?" solution.
Very simple, but also useful.
Don't forget to monitor the underlying platform. I would monitor
- IOPS on the log, data and tmp devices (you do have those on three seperate LUNs don't you ?)
- Swapping (more than a few pages / second is bad for mysql, google "mysql swappiness" to find out why)
- Memory statistics for the host OS. A general rule of thumb I follow is to allocate no more than 80% to the mysql process to leave some room for the OS and the buffer cache
You can use SNMP and Cacti to monitor all of these things
Actually it depends on the database(s) that is running on the sever.
I usually check for the
- number of queries
- depending on database
- slow query log
- mysql connection from a remote host to a certain database
- check that it works from the right hosts
- check that it fails from the right hosts
- select the current time to be sure it's correct
- select for collations/encodings
- connected users
on the framework side I'm using munin for everything that could give me metrics and nagios (soon to be icinga) for everything that gives me status information.
For more comprehensive monitoring of MySQL (but commercial, so only if your database is worth it) check out www.LogicMonitor.com. No configuration required (detects storage engine types, replication status, etc); provides tuning recommendations; full historical graphing and alerting in one system; very extensible, and will monitor the rest of your datacenter infrastructure.