Created
November 9, 2012 15:53
-
-
Save tristanbes/4046457 to your computer and use it in GitHub Desktop.
Install Graphite on Debian Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?