Monitors a slow query log file and automatically shows their execution plans.
docker pull kimitsu/exsqus
docker run --rm -e MYSQL_HOST={MYSQL_HOST} -e MYSQL_DATABASE={MYSQL_DATABASE} -e MYSQL_USER={MYSQL_USER} -e MYSQL_PASSWORD={MYSQL_PASSWORD} -v {PATH_TO_SLOW_QUERY_LOG_DIR}:/tmp kimitsu/exsqus
Prerequisites (MySQL)
- Enable the slow query log setting.
- Mount the log directory path.
Configurations (exsqus)
- Mount the log directory path.
- Set environment variables about the path and MySQL connection configs.
The host name of the MySQL server.
The port number of the MySQL server.
The default value is 3306
.
The protocol for connecting to the MySQL server
The default value is tcp
.
The database name.
The user name in the MySQL server.
The password in the MySQL server.
The path to the slow query log file in the exsqus container.
The default value is /tmp/slow.log
.
If you want to specify multiple paths, separate them with a comma.
See the docker-compose.yml.
An example of sidecar pattern: manifest.