Docker monitoring dashboard: caAdvisor, Grafana and influxdb
So you want to see stats of your running containers yeah?
This is a short ‘to the point’ post about spinning up a set of docker containers to create a Docker monitoring dashboard. @dalekurt started this docker-compose.yml file based on a great post by Brian Christner and I made some changes to make things work as I expect.
Docker compose is awesome and ever since I started using it I stopped running
docker run ..., I create a
docker-compose.yml file and toss all my runtime parameters in there – It is an awesome way to completely document the runtime requirements for all containers for the ‘thing’ you are deploying.
I’ve been a fan of Kibana ever since I first found out about it years ago, same excitement I had when I heard of and used Elasticsearch… but I digress. Graphana is built off of Kibana3 and so naturally I was at home. I got to play more with cAdvisor and influxdb while getting this set up – great projects, check them out. Lets get into it.
- You know how docker works
- You are on a Linux server with Docker and Docker Compose already installed
- You are not running this on a server that is publicly accessible
- Your docker host server is not currently using any of these ports: 3000, 8080, 8086 or 8083
Quick start => Run these in a terminal:
#change this /tmp folder to a directory you want this to live in cd /tmp git clone https://github.com/H2so4/docker-monitoring cd docker-monitoring docker-compose up -d
After running the commands, you will end up with three containers
- InfluxDB – dockermonitoring_influxsrv_1
- Grafana – dockermonitoring_grafana_1
- cAdvisor – dockermonitoring_cadvisor_1
Dashboards and GUIs:
- Grafana Dashboard => http://[server IP]:3000 (e.g. 127.0.0.1:3000)
- InfluxDB UI => http://[server IP]:8086 (e.g. 127.0.0.1:8086)
- cAdvisor Dashboard => http://[server IP]:8080 (e.g. 127.0.0.1:8080)
|command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxsrv:8086|
Graphs… graphs…. more Graphs….