Difference between revisions of "HowTo/InstallGraphite"
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
		
		
		
		
		
	
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | Inspired mostly by [http://graphite.wikidot.com/installation the official documentation here] and [http://graphite.wikidot.com/getting-your-data-into-graphite here] | |
| − | + | ||
| + | == Dashboards == | ||
| + | |||
| + | [https://github.com/kenhub/giraffe Giraffe] | ||
| == Required packages == | == Required packages == | ||
|   apt-get install bzr python-sqlite python-memcache python-django python-cairo libapache2-mod-python python-zope.interface python-django-tagging python-twisted libapache2-mod-wsgi python-simplejson |   apt-get install bzr python-sqlite python-memcache python-django python-cairo libapache2-mod-python python-zope.interface python-django-tagging python-twisted libapache2-mod-wsgi python-simplejson | ||
| + | |||
| + | == method 1 == | ||
|   bzr branch lp:graphite |   bzr branch lp:graphite | ||
| Line 39: | Line 44: | ||
|   => setup database, etc.. |   => setup database, etc.. | ||
|   cp local_settings.py.example local_settings.py |   cp local_settings.py.example local_settings.py | ||
| + | |||
| + | == method 2 == | ||
| + | |||
| + | <pre> | ||
| + | wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz | ||
| + | tar -zxvf graphite-web-0.9.9.tar.gz | ||
| + | mv graphite-web-0.9.9 graphite | ||
| + | rm graphite-web-0.9.9.tar.gz | ||
| + | easy_install django-tagging | ||
| + | pip install carbon | ||
| + | pip install whisper | ||
| + | cd /opt/graphite/conf | ||
| + | sudo cp carbon.conf.example carbon.conf | ||
| + | sudo cp storage-schemas.conf.example storage-schemas.conf | ||
| + | sudo vim storage-schemas.conf | ||
| + | ### edited storage-schemas.conf to be the following | ||
| + | [stats] | ||
| + | priority = 110 | ||
| + | pattern = .* | ||
| + | retentions = 10:2160,60:10080,600:262974 | ||
| + | cd /opt/graphite/ | ||
| + | sudo ./bin/carbon-cache.py start | ||
| + | |||
| + | cp ~/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite | ||
| + | cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi | ||
| + | vim /etc/apache2/sites-available/graphite | ||
| + | /etc/init.d/apache2 reload | ||
| + | |||
| + | cd /opt/graphite/webapp/graphite/ | ||
| + | python manage.py syncdb | ||
| + | chown -R www-data:www-data /opt/graphite/storage/ | ||
| + | /etc/init.d/apache2 restart | ||
| + | cd /opt/graphite/webapp/graphite | ||
| + | cp local_settings.py.example local_settings.py | ||
| + | </pre> | ||
| + | |||
| + | === Tests === | ||
| + | |||
| + |  cd ~/graphite/examples | ||
| + |  chmod +x example-client.py | ||
| + |  ./example-client.py | ||
Latest revision as of 10:05, 26 December 2012
Inspired mostly by the official documentation here and here
Dashboards
Required packages
apt-get install bzr python-sqlite python-memcache python-django python-cairo libapache2-mod-python python-zope.interface python-django-tagging python-twisted libapache2-mod-wsgi python-simplejson
method 1
bzr branch lp:graphite cd graphite/ pushd whisper python setup.py install popd pushd carbon python setup.py install pushd /opt/graphite/conf cp carbon.conf.example carbon.conf cp storage-schemas.conf.example storage-schemas.conf popd popd python check-dependencies.py bzr branch lp:txamqp cd txamqp/ python setup.py install cd .. python setup.py install => setup apache wsgi cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi cp /root/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-enabled/graphite.conf mkdir /etc/apache2/wsgi chown www-data /etc/apache2/wsgi vi /etc/apache2/sites-enabled/graphite.conf => setup servername, wsgi socket path, etc.. popd cd /opt/graphite/webapp/graphite python manage.py syncdb => setup admin user chown -R www-data:www-data /opt/graphite/storage/ vi settings.py => setup database, etc.. cp local_settings.py.example local_settings.py
method 2
wget http://launchpad.net/graphite/0.9/0.9.9/+download/graphite-web-0.9.9.tar.gz tar -zxvf graphite-web-0.9.9.tar.gz mv graphite-web-0.9.9 graphite rm graphite-web-0.9.9.tar.gz easy_install django-tagging pip install carbon pip install whisper cd /opt/graphite/conf sudo cp carbon.conf.example carbon.conf sudo cp storage-schemas.conf.example storage-schemas.conf sudo vim storage-schemas.conf ### edited storage-schemas.conf to be the following [stats] priority = 110 pattern = .* retentions = 10:2160,60:10080,600:262974 cd /opt/graphite/ sudo ./bin/carbon-cache.py start cp ~/graphite/examples/example-graphite-vhost.conf /etc/apache2/sites-available/graphite cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi vim /etc/apache2/sites-available/graphite /etc/init.d/apache2 reload cd /opt/graphite/webapp/graphite/ python manage.py syncdb chown -R www-data:www-data /opt/graphite/storage/ /etc/init.d/apache2 restart cd /opt/graphite/webapp/graphite cp local_settings.py.example local_settings.py
Tests
cd ~/graphite/examples chmod +x example-client.py ./example-client.py

