sudo apt-get install python-pip libcairo2 python-cairo
pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web
Edit the /opt/graphite/webapp/graphite/app_settings.py
file and set the SECRET_KEY
variable.
By default the error ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value
is showed, so I need to add manually a new database.
Edit with the /opt/graphite/webapp/graphite/app_settings.py
file and add at the bottom:
DATABASES = {
'default': {
'NAME': '/opt/graphite/storage/graphite.db',
'ENGINE': 'django.db.backends.sqlite3',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': ''
}
}
You can also use postgresql
, mysql
or ado_mssql
instead of sqlite3
.
Now you can sync the db and adjust permissions by running:
cd /opt/graphite/webapp/graphite
sudo python manage.py syncdb
sudo chown -R ubuntu:ubuntu /opt/graphite/storage/
cd /opt/graphite/conf
cp storage-schemas.conf.example storage-schemas.conf
cp carbon.conf.example carbon.conf
You may also need to set some allowed hosts. Just add ALLOWED_HOSTS = ['localhost']
to the /opt/graphite/webapp/graphite/app_settings.py
file.
python ./bin/carbon-cache.py start
This doesn't work to me, It gives me an error ImportError: No module named twisted.python.util
.
So I need to install python-twisted-core
from apt by typing: sudo apt-get install python-twisted-core
.
python /opt/graphite/bin/run-graphite-devel-server.py --port 8080 /opt/graphite/
http://localhost:8080
If it works correctly you should see a black image with "No Data" in the Graphite Composer. If you see a broken image, it's probably something to do with py2cairo and cairo.
you need a:
apt-get install python-dev
andpip install Twisted<12.0