MySQL with Kibana dashboard running on Docker
Install Docker. Clone this repo to your local machine. Run docker-compose:
docker-compose up
http://localhost:8090/
docker-compose exec mysql bash
mysql -b -N -u root -pmypass mysql
docker-compose exec mysql bash
bash /scripts/sakila.sh
SET GLOBAL log_output = 'table';
SET GLOBAL long_query_time = 0;
SET GLOBAL general_log = 'ON';
SET GLOBAL slow_query_log = 'ON';
SET GLOBAL general_log = 'OFF';
SET GLOBAL slow_query_log = 'OFF';
SHOW VARIABLES LIKE '%log%';
yes "mysql -b -N -u root -pmypass mysql < /scripts/slow.sql >> /tmp/slow.log" | parallel --jobs 1 --delay 30
yes "mysql -b -N -u root -pmypass mysql < /scripts/general.sql >> /tmp/general.log" | parallel --jobs 1 --delay 30
yes "mysql -b -N -u root -pmypass mysql < /scripts/query.sql" | head -n 1000 | parallel
# Remove Elasticsearch indexes:
$ curl -XDELETE elasticsearch:9200/logstash-*
# Check CPU consumption
$ docker stats $(docker inspect -f "{{ .Name }}" $(docker ps -q))
# Remove containers plus volumes
$ docker-compose down -v --remove-orphans --rmi all