Created
January 15, 2020 14:17
-
-
Save LordotU/03d81944f7bb2d04271573e43aae7480 to your computer and use it in GitHub Desktop.
Metrics: Grafana + Prometheus + Node Exporter + cAdvisor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
cadvisor: | |
container_name: cadvisor | |
image: google/cadvisor | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:rw | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
restart: always | |
labels: | |
- traefik.enable=false | |
prometheus: | |
container_name: prometheus | |
image: prom/prometheus:latest | |
volumes: | |
- ~/.prometheus:/etc/prometheus/ | |
command: | |
- --config.file=/etc/prometheus/prometheus.yml | |
links: | |
- cadvisor:cadvisor | |
depends_on: | |
- cadvisor | |
restart: always | |
labels: | |
- traefik.enable=false | |
grafana: | |
container_name: grafana | |
image: grafana/grafana | |
user: "1000" | |
depends_on: | |
- prometheus | |
volumes: | |
- ~/.grafana:/var/lib/grafana | |
- ~/.grafana/provisioning/:/etc/grafana/provisioning/ | |
restart: always | |
labels: | |
- traefik.backend=grafana | |
- traefik.frontend.rule=Host:grafana.olevshin.ru,grafana.levsh.in | |
- traefik.docker.network=web | |
- traefik.port=3000 | |
node-exporter: | |
container_name: node-exporter | |
image: prom/node-exporter | |
volumes: | |
- /proc:/host/proc:ro | |
- /sys:/host/sys:ro | |
- /:/rootfs:ro | |
command: | |
- --path.procfs=/host/proc | |
- --path.sysfs=/host/sys | |
- --collector.filesystem.ignored-mount-points | |
- ^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/) | |
restart: always | |
labels: | |
- traefik.enable=false | |
networks: | |
default: | |
external: | |
name: web |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment