This guide uses Docker to run StatsD.
For Docker installation, see Docker.
Create a directory to store your configuration and compose files.
mkdir -p /opt/statsd
cd /opt/statsd
Define a container for StatsD.
services:
statsd:
image: statsd/statsd:latest
ports:
- "8125:8125/udp"
- "8126:8126"
volumes:
- ./config.js:/opt/statsd/config.js:ro
environment:
- GRAPHITE_HOST=graphite
networks:
- monitoring
networks:
monitoring:
driver: bridge
Create config.js with your backend settings:
{
"graphiteHost": "graphite",
"graphitePort": 2003,
"port": 8125,
"flushInterval": 10000
}
Start the container in the background.
docker compose up -d
statsd/statsd is the official Docker image on Docker Hub8125/udp - StatsD UDP listener (primary)8126/tcp - StatsD TCP listener and admin interfaceAny questions?
Feel free to contact us. Find all contact information on our contact page.