-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
roddik edited this page Jun 22, 2012
·
1 revision
As root:
1. Install graphite, whisper and carbon:
pip install carbon pip install whisper pip install graphite-web
2. Create and edit configs:
cd /opt/graphite/conf cp carbon.conf.example carbon.conf cp storage-schemas.conf.example storage-schemas.conf cd /opt/graphite/ chown -R www-data storage
3. Start carbon-cache:
sudo /opt/graphite/bin/carbon-cache.py start
4. Clone the github repo, add some data for testing:
cd ~ git clone git@github.com:JulesAU/graphite-dev.git cd graphite-dev python ./last-day.py
5. Install nginx and uwsgi:
sudo apt-get install nginx uwsgi-core uwsgi-plugin-python
6. Update the nginx conf, so that one of the locations binds to uwsgi. Below is a sample config for sites-available/default:
root /home/ubuntu/graphite-dev;
index index.html index.htm;
location /display/ {}
location /get/ {
uwsgi_pass unix:/tmp/whisperer.sock;
include uswgi_params;
}
}
7. Create the uswgi_params file:
uwsgi_param REQUEST_URI $request_uri; uwsgi_param PATH_INFO $document_uri; uwsgi_param DOCUMENT_ROOT $document_root; uwsgi_param SERVER_PROTOCOL $server_protocol; uwsgi_param REMOTE_ADDR $remote_addr; uwsgi_param REMOTE_PORT $remote_port; uwsgi_param SERVER_PORT $server_port; uwsgi_param SERVER_NAME $server_name; ' > /etc/nginx/uwsgi_params
8. Start the uwsgi process:
cd ~/graphite-dev sudo uwsgi -x config.xml # Will "work" without sudo as well, but won't respond anything
9. Reload nginx config:
sudo service nginx reload
10. Data should be readable at 127.0.0.1/get/get?metric=system1/loadavg_1min&metric=system1/loadavg_5min&metric=system1/loadavg_15min