Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

bmildren/docker-mysql-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Monitoring

Requires Docker 1.10+

MySQL monitoring example using docker-compose to orchestrate a monitoring solution using grafana, prometheus & influxdb. It includes an example db node using mysql with a sample load generated by sysbench. The prometheus config is manually configured in this example, although could be edited to use your preferred service discovery solution. The prometheus configuration file can be found here: ./prometheus/config/prometheus.yml, the config is imported into the container on startup. When editing the prometheus configuration (to add/remove nodes, etc), you can restart the prometheus container individually to pick up the config changes.

Installation

  • If you don't have it installed already, install docker-compose (https://docs.docker.com/compose/install/)
  • cd to monitor and run: docker-compose up -d
  • To install an example db node with associated collectors, cd to example_dbnode and run: docker-compose up -d
  • To install only the collecters using docker (not required for the example dbnode), cd to collecters and run: docker-compose up -d

If you want to monitor other hosts edit the prometheus config file ./prometheus/config/prometheus.yml add additional targets or your service discovery of choice, and restart prometheus, cd to monitor and run: docker-compose restart prometheus

Default ports

  • Grafana: 3000
  • Prometheus: 9090
  • InfluxDB: 8083 8086
  • MySQL: 3306
  • Prometheus Node Exporter: 9100
  • Prometheus MySQL Exporter (High Res): 9104
  • Prometheus MySQL Exporter (Med Res): 9105
  • Prometheus MySQL Exporter (Low Res): 9106
  • cAdvisor: 8080

Example usage

Bring up monitor containers

cd monitor
docker-compose up -d

Bring up example db-node with node_exporter & mysqld_exporter

cd example_dnode
docker-compose up -d

Restart individual service

cd monitor
docker-compose restart prometheus

View mysqld log

cd example_dbnode
docker-compose logs mysqld

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages