*this assumes debian or ubuntu
Graphite Cookbook Install
$ git clone https://github.com/cookingclouds/cookbooks/tree/master/cc_graphite
I Know there is a cookbook for graphite in the opscode repo but it has dependencies.
This cookbook shouldn’t have dependencies and is also a lot more messy
Run after installing cookbook :
$ /opt/graphite/bin/carbon-cache.py start $ cd /opt/graphite/webapp/graphite && python manage.py createsuperuser
Manual Install
Grab the sourcecode
$ wget https://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.10.tar.gz $ wget https://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz $ wget https://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz $ wget https://launchpad.net/graphite/0.9/0.9.10/+download/check-dependencies.py
Install Whisper Database
$ ls |grep tar |while read i ; do tar xzvf $i ; done $ apt-get -y install apache2 python-django python-django-tagging python-ldap python-memcache python-cairo $ cd ~/whisper-0.9.10/ $ python setup.py install
Install Carbon
$ apt-get -y install python-twisted python-simplejson $ cd ~/carbon-0.9.10/ $ python setup.py install $ cd /opt/graphite/conf/ $ cp carbon.conf.example carbon.conf $ cp storage-schemas.conf.example storage-schemas.conf $ cd /opt/graphite/ $ ./bin/carbon-cache.py start
Install Graphite-web
$ cd ~/graphite-web-0.9.10/ $ python check-dependencies.py $ python setup.py install $ cp examples/example-graphite-vhost.conf /etc/apache2/sites-available/default $ cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi $ mkdir /etc/apache2/run $ apt-get -y install libapache2-mod-wsgi $ /etc/init.d/apache2 reload $ cd /opt/graphite/webapp/graphite/ $ python manage.py syncdb $ chown -R www-data:www-data /opt/graphite/storage $ cd /opt/graphite/webapp/graphite $ cp local_settings.py.example local_settings.py $ /etc/init.d/apache2 restart
Examples on how to send data to graphite
hostname = * you guessed it
test_001 = service name
1001 = value
$NOW = epoch time to input in graph
$ NOW=`date +%s` ; echo "hostname.test_001 1001 $NOW" |nc localhost 2003
or
$ cd /opt/graphite/examples $ ./example-client.py