Skip to content

Instantly share code, notes, and snippets.

Forked from surjikal/
Last active January 5, 2022 09:07
Show Gist options
  • Save relaxdiego/7539911 to your computer and use it in GitHub Desktop.
Save relaxdiego/7539911 to your computer and use it in GitHub Desktop.
Installing Graphite in OS X Mavericks

Follow these steps to install graphite on OS X Mavericks.


  • Homebrew
  • Python 2.7
  • Git

Install dependencies

Install Cairo and friends

brew install cairo
brew install py2cairo

Install Django

pip install Django==1.5
pip install django-tagging

Install Graphite

sudo pip install carbon
pip install whisper
sudo pip install graphite-web
sudo 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).

# Initialize database
python syncdb

Start carbon

python /opt/graphite/bin/ start

Start Graphite

python /opt/graphite/bin/ /opt/graphite

Hope that it works!

Go to:


You should see this if it works properly:


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

Check the debug output here:


Optional convenience aliases

Add this to your .bashrc or .bash_profile:

alias carbon='python /opt/graphite/bin/'
alias graphite-web='python /opt/graphite/bin/ /opt/graphite'

Additional resources

Copy link

geeves commented Oct 25, 2016

This was a lot of help, thanks! These instructions also work as well for El Capitan.

  • Used MaxGabriel's suggestion of django-tagging and zope.intertace.
  • Install cairocffi: pip install cairocffi - Graphite will run without it, but none of your graphs will render (they'll be broken images).

I have it setup to run with Cassandra and Grafana and also followed much of the .ini and .conf setup from this article

Copy link

Great contributions - for those ones struggling with database sync there is a missing version : sudo pip install django-tagging==0.3

Copy link

drewish commented Apr 6, 2017

I needed to add sudo to the Django setup commands

Copy link

skabbit commented May 19, 2017

Current way to have graphite running I've found is to update the following command:

pip install django-tagging==0.3.6
pip install Django==1.8
/opt/graphite/venv/graphite/lib/python2.7/site-packages/django/bin/ syncdb --settings=graphite.settings --pythonpath /opt/graphite/webapp

NOTE: Use your path to venv

But still I have problems with serving static files...

Copy link

jdrain commented Jun 9, 2017

I'm having issues with the "Create Default Database" step... There is no such file in the directory /opt/graphite/webapp/graphite

Anyone have an idea why this is the case/if there is a work around?

Copy link

@jdrain - I'm having the same issue. you found any answers?

Copy link

I am also having same issue on mac , there is no in /opt/graphite

please help

Copy link

@odd-snail @jeffnelson @jdrain
per my understanding the --run-syncdb option allows for creating the default schema and tables

This worked for me:
django-admin migrate --pythonpath /opt/graphite/webapp --settings graphite.settings --run-syncdb

Copy link

siddhartha-chandra commented Dec 7, 2017

btw any idea what are the default credentials to access the Login page of Graphite? I have started the server with the default sqlite3 backend and unable to get authenticated in the login section

Copy link

Good job

Copy link

ank29 commented Jul 11, 2018

python syncdb

Where should I run this command from ?
I am getting the following exception : /usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/Resources/ can't open file '': [Errno 2] No such file or directory

Copy link

ank29, dont bother running it from local

use below as siddhartha-chan suggested:
django-admin migrate --pythonpath /opt/graphite/webapp --settings graphite.settings --run-syncdb

Copy link

Can any one help me to configure remote graphite.
or is there any way to have carbon-relay-ng in mac

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