Skip to content

Instantly share code, notes, and snippets.

@BirkhoffLee
Created September 16, 2019 15:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BirkhoffLee/fcd2029389c15861dc723653513fc28b to your computer and use it in GitHub Desktop.
Save BirkhoffLee/fcd2029389c15861dc723653513fc28b to your computer and use it in GitHub Desktop.
docker-compose Grafana + InfluxDB + collectd with Traefik
version: '3.2'
services:
collectd:
image: fr3nd/collectd
privileged: true
network_mode: host
volumes:
- /proc:/mnt/proc:ro
- ./collectd.conf:/etc/collectd/collectd.conf
influxdb:
image: influxdb
expose:
- 8083
- 8086
- 25826
networks:
monitoring:
ipv4_address: 172.28.0.254
volumes:
- influxdb-storage:/var/lib/influxdb
- ./influxdb.conf:/etc/influxdb/influxdb.conf
- ./types.db:/usr/share/collectd/types.db:ro
# chronograf:
# image: chronograf
# networks:
# - traefik
# - default
# networks:
# traefik:
# monitoring:
# default:
# expose:
# - 8888
# labels:
# - "traefik.docker.network=traefik"
# - "traefik.enable=true"
# - "traefik.basic.frontend.rule=Host:monitoring-influxdb.birkhoff.me"
# - "traefik.basic.port=8888"
# - "traefik.basic.protocol=http"
# volumes:
# - chronograf-storage:/var/lib/chronograf
# depends_on:
# - influxdb
# environment:
# - INFLUXDB_URL=http://influxdb:8086
# - INFLUXDB_USERNAME=admin
# - INFLUXDB_PASSWORD=admin
grafana:
image: grafana/grafana
networks:
- traefik
- monitoring
- default
expose:
- 3000
labels:
- "traefik.docker.network=traefik"
- "traefik.enable=true"
- "traefik.basic.frontend.rule=Host:monitoring.birkhoff.me"
- "traefik.basic.port=3000"
- "traefik.basic.protocol=http"
volumes:
- grafana-storage:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
influxdb-storage:
chronograf-storage:
grafana-storage:
networks:
traefik:
external: true
monitoring:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment