Time Serie - Graphite (Storage and Visualization)


Graphite 1) is a metrics server software.

It does two things:

  • Store metrics (numeric time-series data)
  • Render graphs of this data on demand

The inherent scheme of organization in graphite is tree-like and hence the searches do-not/ can-not yield results from a different subtree. This makes it not-so-suitable for cross-dimensional searches.

It has a fixed-size database, similar in design and purpose to RRD. It originated at Orbitz in 2006 and was open sourced in 2008.



 docker run -d --name=graphite -p 80:80 -p 2003:2003 -p 2004:2004 -p 7002:7002 nickstenning/graphite


  • 80: the graphite 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)


  • Login to the graphite-web (a Django application) to http://dockerhost:80 with the username admin and password admin
  • Graphite HOME is: /var/lib/graphite

Graphite Message Format

Graphite understands messages with this format:

metric_path value timestamp\n


  • metric_path is the metric namespace that you want to populate.
  • value is the value that you want to assign to the metric at this time.
  • timestamp is the unix epoch time in second !


  • Adding a metric

# Example
echo "foo.bar 1 `date +%s`" | nc localhost 2003


  • foo.bar is the qualified named metric. bar is the name and foo its namespace. <note tip>Graphite uses a dot-delimited namespace structure for metrics, graphs, and even dashboards</note>
  • nc: nc localhost 2003 creates a TCP connection to the port 2003 on the localhost. The standard input (ie foo.bar 1 1482334814) is sent to the host, and anything that comes back across the connection is sent to the standard output.

This metric would be stored in a Whisper database (wsp) at <prefix>/storage/whisper/foo/bar.wsp (Graphite prefix default to /opt/graphite).



Carbon can be started with the carbon-cache.py script:

GRAPHITE_HOME/bin/carbon-cache.py start

This starts the main Carbon daemon in the background.


Logs are located in GRAPHITE_HOME/storage/log/carbon-cache/ for any errors.

Powered by ComboStrap