DEV Community

Cover image for Metrics with Prometheus StatsD Exporter and Grafana

Metrics with Prometheus StatsD Exporter and Grafana

Kirk Lewis on July 31, 2019

This post explains how to convert StatsD metrics using the Prometheus StatsD-exporter, and later visualising them with Grafana. I explain from th...
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
Collapse
 
scythargon profile image
Dmitry Vasilev • Edited

Uh, I wish you'd share the sources repo. But the article is brilliant, thank you!

To wrap all docker commands via docker-compose.yml and put all the config files in the same repo - that would be super helpful.

Collapse
 
martincharles profile image
martin-charles

Is it possible to monitor Linux OS ( CPU,memory etc) and send the same data over statsd? i know we have node-exporter to do that, but looking for a POC to send the linux based metrics over statd

Collapse
 
franknozly profile image
Ron F.

0.5 is 50th percentile / median, not 5th percentile.