-
-
Save tristanbes/4046457 to your computer and use it in GitHub Desktop.
# Installing graphite dependencies | |
apt-get install -y python2.6 python-pip python-cairo python-django python-django-tagging | |
apt-get install -y libapache2-mod-wsgi python-twisted python-memcache python-pysqlite2 python-simplejson | |
pip install whisper | |
pip install carbon | |
pip install graphite-web | |
# Setup a vhost by grabbing the example the graphite team released on their repo. | |
# In this file, you'll provide the url used to access to your Graphite dashboard | |
wget https://raw.github.com/tmm1/graphite/master/examples/example-graphite-vhost.conf -O /etc/apache2/sites-available/graphite | |
# If you are running on a Debian, don't forget to replace in the vhost, the WSGISocketPrefix value by the following: | |
WSGISocketPrefix /var/run/apache2/wsgi | |
# Configuring graphite | |
cd /opt/graphite/conf/ | |
cp graphite.wsgi.example graphite.wsgi | |
cp carbon.conf.example carbon.conf | |
cp storage-schemas.conf.example storage-schemas.conf | |
# Edit storage-schemas.conf in order to include a custom tweak provided by stats.d | |
[stats] | |
pattern = ^stats.* | |
retentions = 10:2160,60:10080,600:262974 | |
[carbon] | |
pattern = ^carbon\. | |
retentions = 60:90d | |
[default_1min_for_1day] | |
pattern = .* | |
retentions = 60s:1d | |
# Create a vi storage-aggregation.conf | |
vi storage-aggregation.conf | |
# Then copy paste in it the following parameters | |
[min] | |
pattern = \.min$ | |
xFilesFactor = 0.1 | |
aggregationMethod = min | |
[max] | |
pattern = \.max$ | |
xFilesFactor = 0.1 | |
aggregationMethod = max | |
[sum] | |
pattern = \.count$ | |
xFilesFactor = 0 | |
aggregationMethod = sum | |
[default_average] | |
pattern = .* | |
xFilesFactor = 0.3 | |
aggregationMethod = average | |
# Let's go back to the installation process | |
cd /opt/graphite/webapp/graphite | |
python manage.py syncdb | |
chown -R www-data:www-data /opt/graphite/storage/ | |
# Enabling graphite host | |
a2ensite graphite | |
/opt/graphite/bin/carbon-cache.py start | |
/etc/init.d/apache2 restart |
Note, selecting 'python2.6-minimal' for regex 'python2.6'
E: Unable to locate package python-pip
E: Unable to locate package python-cairo
E: Unable to locate package python-django
E: Unable to locate package python-django-tagging
/opt/graphite/webapp/graphite# /opt/graphite/bin/carbon-cache.py start
/usr/lib/python2.7/dist-packages/zope/init.py:3: UserWarning: Module twisted was already imported from /usr/lib/python2.7/dist-packages/twisted/init.pyc, but /opt/graphite/lib is being added to sys.path
import pkg_resources
Starting carbon-cache (instance a)
THX! Debian7.8 64bit OK
Might need this also, if you are on Apache 2.4: kelvk/chef-bcpc@245c23f
Hi I am been following the steps from root@quic03:/home/x# . However, when I do cd /opt/graphite/conf/, I got: bash: cd: /opt/graphite/conf/: No such file or directory. And I just found out that all the files are installed at /usr/local/lib/python2.7/dist-packages. Did I make mistakes on installation path?
The file /etc/apache2/sites-available/graphite
needs to be graphite.conf
for the command a2ensite graphite
to work
You might also need libffi-dev to be installed before launching the first three pip installs
This no longer works in Debian 9. The pip packages install nothing in /opt/graphite/
can you do a new one for Debian Buster please?
I had to make little modifications for starting carbon-cache. The solution is posted here: http://stackoverflow.com/a/19916809/568270
Also the current code is not working with Django 1.6
You have to use Django 1.5