Created
February 27, 2022 07:11
-
-
Save tanmay-bhat/7238051e2f2925ee629c71dfeb6aaddf to your computer and use it in GitHub Desktop.
docker-compose file which collects container & node metrics via grafana agent and sends to prometheus server via remote write
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: | |
| grafana-agent: | |
| image: grafana/agent:v0.23.0 | |
| container_name: grafana-agent | |
| volumes: | |
| - /path/to/data/:/etc/agent/data | |
| - /path/to/agent.yaml:/etc/agent/agent.yaml | |
| node-exporter: | |
| image: prom/node-exporter:v1.3.1 | |
| container_name: node_exporter | |
| command: | |
| - '--path.rootfs=/host' | |
| network_mode: host | |
| pid: host | |
| volumes: | |
| - '/:/host:ro,rslave' | |
| cadvisor: | |
| image: gcr.io/cadvisor/cadvisor | |
| container_name: cadvisor | |
| volumes: | |
| - /sys:/sys:ro | |
| - /:/rootfs:ro | |
| - /var/run:/var/run:rw | |
| - /var/lib/docker/:/var/lib/docker:ro | |
| - /dev/disk/:/dev/disk:ro |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment