Last active
March 25, 2025 08:49
-
-
Save ssplatt/90adad25e8a18c58e749a8475f8f5a83 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 |
Shouldn't the snmp UDP port be 161?
snmp can be configured to listen on a different port but 161 is the default.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Shouldn't the snmp UDP port be 161?