-
-
Save AstraSerg/bade98d2d7fd0298b99734e9913f7e04 to your computer and use it in GitHub Desktop.
docker - prometheus with snmp_exporter, node_exporter, and cadvisor
This file contains hidden or 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: | |
prometheus: | |
image: prom/prometheus | |
volumes: | |
- /opt/docker-persist/prometheus/data:/prometheus-data | |
ports: | |
- 9090:9090 | |
restart: always | |
command: --config.file=/prometheus-data/prometheus.yml | |
snmp: | |
image: quay.io/prometheus/snmp-exporter | |
volumes: | |
- /opt/docker-persist/snmp-exporter:/etc/snmp_exporter | |
ports: | |
- 9116:9116 | |
- 116:116/udp | |
restart: always | |
command: --config.file=/etc/snmp_exporter/snmp.yml | |
node_exporter: | |
image: quay.io/prometheus/node-exporter | |
volumes: | |
- /proc:/host/proc:ro | |
- /sys:/host/sys:ro | |
- /:/rootfs:ro | |
ports: | |
- 9100:9100 | |
network_mode: host | |
restart: always | |
command: | |
- --path.procfs=/host/proc | |
- --path.sysfs=/host/sys | |
- --collector.filesystem.ignored-mount-points="^/(sys|proc|dev|host|etc)($$|/)" | |
cadvisor: | |
image: google/cadvisor:latest | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:rw | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
- /dev/disk/:/dev/disk:ro | |
ports: | |
- 8084:8080 | |
restart: always |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment