Setting up statsd + graphite on Ubuntu 12.04 LTS

January 18, 2013

There are many great tutorials about setting up statsd and graphite, specifically on Ubuntu 12.04. The best walk through I found was I'd like to add some things that were left out of that tutorial that I had to figure out.

Database Creation

The above Gist leaves out the initial database creation. Be sure to thoroughly read so you know at which step to create the db. I did this step after configuring Apache but before restarting the server.


If you see an error message similar to the following:

(2)No such file or directory: mod_wsgi (pid=19506): Unable to connect to WSGI daemon process 'graphite' on '/etc/apache2/run/wsgi.19365.1.1.sock' after multiple attempts.

That's a clue to edit

and make sure that the configuration for WSGISocketPrefix is set as follows:

WSGISocketPrefix /var/run/apache2/wsgi

Thanks to Marcelo Olivas for that tip.</a>

Target WSGI script '/opt/graphite/conf/graphite.wsgi' cannot be loaded as Python module.

If you see this error, make sure that apache owns the directory


This thread pointed me in the right direction.

Good luck.

See Also


Measure anything, measure everything