2019-05-30 20:53:02 +08:00
|
|
|
# https://docs.docker.com/compose/compose-file/
|
|
|
|
version: "3.6"
|
|
|
|
|
|
|
|
# https://docs.docker.com/compose/compose-file/#networks
|
|
|
|
networks:
|
|
|
|
rabbitmq-prometheus:
|
|
|
|
|
|
|
|
# https://docs.docker.com/compose/compose-file/#volumes
|
|
|
|
volumes:
|
|
|
|
rabbitmq-prometheus_prometheus:
|
|
|
|
rabbitmq-prometheus_grafana:
|
|
|
|
|
|
|
|
services:
|
2019-10-02 20:11:21 +08:00
|
|
|
grafana:
|
|
|
|
# https://hub.docker.com/r/grafana/grafana/tags
|
2022-08-05 22:46:27 +08:00
|
|
|
image: grafana/grafana:8.3.4
|
2019-10-02 20:11:21 +08:00
|
|
|
ports:
|
|
|
|
- "3000:3000"
|
|
|
|
networks:
|
|
|
|
- "rabbitmq-prometheus"
|
|
|
|
volumes:
|
|
|
|
- rabbitmq-prometheus_grafana:/var/lib/grafana
|
|
|
|
- ./grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/rabbitmq.yaml
|
|
|
|
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/prometheus.yaml
|
|
|
|
- ./grafana/dashboards:/dashboards
|
|
|
|
environment:
|
|
|
|
# https://grafana.com/plugins/flant-statusmap-panel
|
|
|
|
# https://grafana.com/plugins/grafana-piechart-panel
|
|
|
|
# https://grafana.com/plugins/grafana-polystat-panel
|
|
|
|
# https://grafana.com/plugins/jdbranham-diagram-panel
|
|
|
|
# https://grafana.com/plugins/michaeldmoore-multistat-panel
|
|
|
|
# https://grafana.com/plugins/vonage-status-panel
|
|
|
|
# https://grafana.com/plugins/yesoreyeram-boomtable-panel
|
|
|
|
GF_INSTALL_PLUGINS: "flant-statusmap-panel,grafana-piechart-panel"
|
2019-05-30 20:53:02 +08:00
|
|
|
prometheus:
|
|
|
|
# https://hub.docker.com/r/prom/prometheus/tags
|
2025-03-02 02:21:51 +08:00
|
|
|
image: prom/prometheus:v2.53.3
|
2019-05-30 20:53:02 +08:00
|
|
|
networks:
|
|
|
|
- "rabbitmq-prometheus"
|
|
|
|
ports:
|
|
|
|
- "9090:9090"
|
|
|
|
volumes:
|
|
|
|
- rabbitmq-prometheus_prometheus:/prometheus
|
|
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml
|
|
|
|
node-exporter:
|
|
|
|
command:
|
|
|
|
- '--path.procfs=/host/proc'
|
|
|
|
- '--path.rootfs=/rootfs'
|
|
|
|
- '--path.sysfs=/host/sys'
|
|
|
|
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
|
|
|
|
expose:
|
|
|
|
- 9100
|
|
|
|
# https://hub.docker.com/r/prom/node-exporter/tags
|
2021-07-30 02:27:31 +08:00
|
|
|
image: prom/node-exporter:v1.2.0
|
2019-05-30 20:53:02 +08:00
|
|
|
networks:
|
|
|
|
- "rabbitmq-prometheus"
|
|
|
|
volumes:
|
|
|
|
- /proc:/host/proc:ro
|
|
|
|
- /sys:/host/sys:ro
|
|
|
|
- /:/rootfs:ro
|
|
|
|
cadvisor:
|
|
|
|
expose:
|
|
|
|
- 8080
|
|
|
|
# https://hub.docker.com/r/google/cadvisor/tags
|
|
|
|
image: google/cadvisor:v0.33.0
|
|
|
|
networks:
|
|
|
|
- "rabbitmq-prometheus"
|
|
|
|
volumes:
|
|
|
|
- /:/rootfs:ro
|
|
|
|
- /var/run:/var/run:rw
|
|
|
|
- /sys:/sys:ro
|
|
|
|
- /var/lib/docker/:/var/lib/docker:ro
|
|
|
|
#- /cgroup:/cgroup:ro #doesn't work on MacOS only for Linux
|