Setting up statsd + graphite on Ubuntu 12.04 LTS
January 18, 2013There 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.
Database Creation
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.
WSGISocketPrefix
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
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
/opt/graphite/storage/logs/webapp
This thread pointed me in the right direction.
Good luck.