Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

Graphite + Carbon + Statsd + Grafana + Elasticsearch

An all-in-one image running graphite and carbon-cache and grafana.

This image contains a sensible default configuration of graphite and
carbon-cache. Starting this container will, by default, bind the the following
host ports:

  • 8080: the graphite web interface
  • 80: the grafana web interface
  • 2003: the carbon-cache line receiver (the standard graphite protocol)
  • 2004: the carbon-cache pickle receiver
  • 7002: the carbon-cache query port (used by the web interface)


On an Ubuntu server:

cd /srv
git clone
cd /srv/docker-grafana
bash build
bash start


Visit: http://<your ip>

Send data

var metricClient = require('dgram').createSocket('udp4')

function sendToStatsd(key, value, type){
  // key is a dot separated string
  // value is a number
  // type is one of ms, c, or g
  var message = new Buffer(process.env.NODE_ENV + '.' + key + ':' + value + '|' + type)
  metricClient.send(message, 0, message.length, 8125, '<your ip>', function (err, bytes){
    if (err) console.error(err || bytes)

Important lessons learned about Graphite

Don't go crazy with stats saving

Whisper, the data storage layer of Graphite is pretty aggressive with how it saves new metrics. So, you can quickly run out of space if you do something crazy like create a new stat for every URL.

What to do about space

Graphite (and carbon) does not have an auto-delete function. Eventually, the HDD will fill up. For very light use, (~6 different stats) I saw about 2MB per 12 hours of increase. We'll probably need a cron-job eventually:


All pushes to master auto-build the docker image on the offical docker registry.

Docker Pull Command
Source Repository