Skip to content

Instantly share code, notes, and snippets.

@rlipscombe
Forked from relaxdiego/graphite.md
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlipscombe/9954470 to your computer and use it in GitHub Desktop.
Save rlipscombe/9954470 to your computer and use it in GitHub Desktop.

Follow these steps to install graphite on OS X Mavericks.

Prerequisites

  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

brew update

brew install cairo
brew install py2cairo
sudo ln -s /usr/local/Cellar/py2cairo/1.10.0/lib/python2.7/site-packages/cairo /Library/Python/2.7/site-packages/

Install Django

sudo easy_install pip

sudo pip install Django==1.5
sudo pip install django-tagging

Install Graphite

sudo CC=/usr/local/bin/gcc-4.2 pip install carbon
sudo CC=/usr/local/bin/gcc-4.2 pip install whisper
sudo CC=/usr/local/bin/gcc-4.2 pip install graphite-web
sudo CC=/usr/local/bin/gcc-4.2 pip install Twisted==11.1.0

sudo chown -R <your username>:staff /opt/graphite

Configure graphite

cp /opt/graphite/conf/carbon.conf{.example,}
cp /opt/graphite/conf/storage-schemas.conf{.example,}

Create default database

cd /opt/graphite/webapp/graphite

# Modify this file to change database backend (default is sqlite).
cp local_settings.py{.example,}

# Initialize database
# (It might prompt you to set up a superuser; follow the instructions)
python manage.py syncdb

Start carbon

python /opt/graphite/bin/carbon-cache.py start

Start Graphite

python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite

Hope that it works!

Go to:

http://localhost:8080

You should see this if it works properly:

bacon

If you get a broken image, it most likely means that something is wrong py2cairo and cairo.

Check the debug output here:

http://localhost:8080/render

Optional convenience aliases

Add this to your .bashrc or .bash_profile:

alias carbon='python /opt/graphite/bin/carbon-cache.py'
alias graphite-web='python /opt/graphite/bin/run-graphite-devel-server.py /opt/graphite'

Additional resources

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