DEV Community

Discussion on: Metrics with Prometheus StatsD Exporter and Grafana

Collapse
 
wywlinux profile image
wyw-linux

Below is the docker compose file for this demo.

docker-compose.yaml

prom-statsd-exporter:
  image: prom/statsd-exporter
  ports:
  - 8125:8125/udp
  - 9102:9102
  command:
  - --statsd.mapping-config=/tmp/test-mapping.yml
  - --statsd.listen-udp=:8125
  - --web.listen-address=:9102
  volumes:
  - $pwd/test-mapping.yml:/tmp/test-mapping.yml

prometheus:
  image: prom/prometheus
  ports:
  - 9090:9090
  links:
  - prom-statsd-exporter
  volumes:
  - $pwd/prometheus.yml:/prometheus.yml
  command:
  - --config.file=/prometheus.yml
  - --log.level=debug
  - --web.listen-address=:9090
  - --web.page-title='Prometheus - Test Metrics Demo'

grafana:
  image: grafana/grafana
  links:
  - prometheus
  ports:
  - 3000:3000
Enter fullscreen mode Exit fullscreen mode