Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2011 16:12
Show Gist options
  • Save collegeman/862471 to your computer and use it in GitHub Desktop.
Save collegeman/862471 to your computer and use it in GitHub Desktop.
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone
cd node
sudo make install
# install the Node package manager for later use
curl | sudo sh
npm install express
# clone the statsd project
git clone
# download everything for graphite
mkdir graphite
cd graphite/
wget ""
wget ""
wget ""
tar xzvf whisper-0.9.6.tar.gz
tar xzvf carbon-0.9.6.tar.gz
tar xzvf graphite-web-0.9.6.tar.gz
# install whisper - Graphite's DB system
cd whisper-0.9.6
sudo python install
# install carbon - the Graphite back-end
cd carbon-0.9.6
python install
cd /opt/graphite/conf
cp carbon.conf.example carbon.conf
# copy the example schema configuration file, and then configure the schema
# see:
cp storage-schemas.conf.example storage-schemas.conf
# install other graphite dependencies
sudo apt-get install python-cairo
sudo apt-get install python-django
sudo apt-get install memcached
sudo apt-get install python-memcache
sudo apt-get install python-ldap
sudo apt-get install python-twisted
sudo apt-get install apache2 libapache2-mod-python
cd ~/graphite/graphite-web-0.9.6
python install
# copy the graphite vhost example to available sites, edit it to you satisfaction, then link it from sites-enabled
cp example-graphite-vhost.conf /etc/apache2/sites-available/graphite.conf
ln -s /etc/apache2/sites-available/graphite.conf /etc/apache2/sites-enabled/graphite.conf
apache2ctl restart
# I had to create these log files manually
touch info.log
chmod 777 info.log
touch exception.log
chmod 777 exception.log
# make sure to change ownership of the storage folder to the Apache user/group - mine was www-data
sudo chown -R www-data:www-data /opt/graphite/storage/
cd /opt/graphite/webapp/graphite
# copy the local_settings example file to creating the app's settings
# this is where both carbon federation and authentication is configured
# run syncdb to setup the db and prime the authentication model (if you're using the DB model)
sudo python syncdb
# start the carbon cache
cd /opt/graphite/bin/ start
# copy the the statsd config example to create the config file
# unless you used non-default ports for some other feature of the system, the defaults in the config file are fine
cd ~/statsd
cp exampleConfig.js local.js
# start statsd
node stats.js local.js
Copy link

Yep. Thanks @nickhoffman.

Copy link

Thanks for posting this, mate! Very helpful.

Copy link

You're welcome. I don't have a production use for it yet, but it's a really cool product.

Copy link

ngara commented Sep 28, 2011

This was a really helpful post, thanks!

Things I changed:
Add pkg-config to line 2, to get rid of the openssl error when using ./configure
After using git clone, "git checkout v0.4.9" to make node 0.4.9 the active version so that express is compatible with it using npm.

The URLs for graphite are now:

Copy link

I would love to incorporate your changes into my own gist. Do you have the whole scripts somewhere, including your modifications?

Copy link

ngara commented Sep 29, 2011 via email

Copy link

Here's a full-fledged Git project for you to contribute to:

Just click Edit this file, make your changes, and I'll get a pull request.

Copy link

ngara commented Oct 6, 2011

Did you get the pull request? Do I need to do anything else to send the request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment