Graphite & Statsd are difficult to orchestrate. This Docker image will help you get up & running quickly.
Follow this * tutorial *, and you will end up with a similar setup:
docker run -d --name graphite -p 8080:80 -p 2003:2003 -p 8125:8125/udp castawaylabs/graphite-statsd
This starts a Docker container named: graphite
- Nginx - reverse proxies the graphite dashboard
- Graphite - front-end dashboard
- Carbon - back-end
- Statsd - UDP metrics aggregator
Service | Host | Container |
---|---|---|
nginx | 80 | 80 |
carbon | 2003 | 2003 |
statsd | 8125 | 8125 |
These volumes can be optionally mounted. For whatever reason, if you want to edit the config files, i suggest you fork this repo and edit conf/*.conf directly, rebuilding the image as you wish.
Alternatively, you can mount files to overwrite the defaults.. See the Dockerfile
for more info (look for ADD statements)
Container |
---|
/var/log |
/opt/graphite/storage |
/opt/graphite/conf |
Let's fake some stats with a random counter to prove things are working.
echo "foo:1|c" | nc -u -w0 127.0.0.1 8125
echo "foo:25|ms" | nc -u -w0 127.0.0.1 8125
Open Graphite in a browser at http://localhost/dashboard.
In ~10s, refresh graphite, you should see stats.foo
and stats.timers.foo.*
.
- Update the default Django admin user account. The default is insecure.
- username: root
- password: root
- email: root.graphite@example.com
First login at: http://localhost/account/login Then update the root user's profile at: http://localhost/admin/auth/user/1/
- Read up on Graphite's post-install tasks. Focus on the storage-schemas.conf
Note: Fork this repo and rebuild the image, changing conf/*.conf files. These are defaults and will work for most configurations, but if you need something specific, check out the docs link above.
Read more about synching Statsd with Graphite configs.
-
Learn about Statsd.
-
Start sending stats from your apps.
- Introduction to Docker
- Practical Guide to StatsD/Graphite Monitoring
- Configuring Graphite for StatsD
- Matej Kramny matej@matej.me
Sponsored by nodegear - Awesome Nodejs Platform for Developers (with real-time stats)
Work inspired by this awesome guy: hopsoft from his repo (i cleaned it up a little a lot)