There are many great tutorials about setting up statsd and graphite, specifically on Ubuntu 12.04. The best walk through I found was https://github.com/janoside/ubuntu-statsd-graphite-setup. I'd like to add some things that were left out of that tutorial that I had to figure out.
The above Gist leaves out the initial database creation. Be sure to thoroughly read http://graphite.wikidot.com/installation 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
/etc/apache2/sites-available/defaultand make sure that the configuration for
WSGISocketPrefixis set as follows:
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.