Skip to content

Instantly share code, notes, and snippets.

@sukso96100
Created July 23, 2018 10:08
Show Gist options
  • Save sukso96100/f989a65089338a51ee371321fcc0f0af to your computer and use it in GitHub Desktop.
Save sukso96100/f989a65089338a51ee371321fcc0f0af to your computer and use it in GitHub Desktop.
Monitoring Docker performance using cAdvisor, InfluxDB, Grafana
version: "3"
services:
influx:
image: influxdb
volumes:
- influx:/var/lib/influxdb
environment:
INFLUXDB_DB: cadvisor
INFLUXDB_USER: cadvisor
INFLUXDB_USER_PASSWORD: cadvisor
cadvisor:
image: google/cadvisor:latest
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
links:
- influx
command: -logtostderr -docker_only -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influx:8086
restart: unless-stopped
grafana:
image: grafana/grafana:latest
ports:
- 4000:3000
volumes:
- grafana:/var/lib/grafana
links:
- influx
volumes:
influx:
driver: local
grafana:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment