Steps I used to install graphite (http://graphite.wikidot.com) on OS X Lion Jan 14 2013.
Your Application sends stats over UDP to... statsd (the data collection agent) which sends the stats to... Carbon (the storage application) which stores the data in... Whisper db which is immediately cached and optimized for time-series data.
The Graphite webapp reads data from the Whisper db and the cache and show us pretty graphs.
brew install python
$ python --version
Python 2.7.3
$ type python
python is hashed (/usr/local/bin/python)
$ file /usr/local/bin/python
/usr/local/bin/python: Mach-O 64-bit executable x86_64
$ brew --version
0.9.3
brew install cairo
brew install py2cairo
sudo chown -R jjulian:jjulian /opt
pip install carbon whisper django django-tagging graphite-web
cd /opt/graphite/webapp/graphite
cp local_settings.py.example local_settings.py
- edit file, uncomment DATABASES hash -
python manage.py syncdb
#sudo chown -R nobody:nobody /opt/graphite/storage/
cd /opt/graphite/conf
cp storage-schemas.conf.example storage-schemas.conf
cp carbon.conf.example carbon.conf
mkdir /opt/graphite/bin
ln -s /usr/local/share/python/carbon-cache.py bin
ln -s /usr/local/share/python/run-graphite-devel-server.py bin
python ./bin/carbon-cache.py start
export PATH=$PATH:/usr/local/share/python/
python /usr/local/share/python/run-graphite-devel-server.py /opt/graphite
http://localhost:8080
You should see a black image with "No Data" in the Graphite Composer. If you see a broken image, it's probably something to do with py2cairo and cairo.
Using statsd in the ruby app, increment a counter:
Statsd.increment('myapp.testcounter1')
Statsd is running, collecting stats via UDP, sending them to Carbon on port 2003. The Graphite (front-end) reads the data and shows it in a reasonable manner.