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.
In case this helps anyone: I made it work with
...:/opt/graphite/webapp# pip list
apt-xapian-index (0.41)
carbon (0.9.10)
ceres (0.10.0)
chardet (2.0.1)
distribute (0.6.14)
Django (1.5.10)
django-tagging (0.3.2)
GnuPGInterface (0.3.2)
graphite-web (0.9.12)
numpy (1.4.1)
PAM (0.4.2)
pip (1.5.6)
pyOpenSSL (0.10)
pyserial (2.3)
python-apt (0.7.100.1-squeeze1)
python-debian (0.1.18-squeeze1)
reportbug (4.12.6)
setuptools (6.0.2)
Twisted (11.1.0)
Twisted-Core (10.1.0)
unattended-upgrades (0.1)
whisper (0.9.12)
wsgiref (0.1.2)
zope.interface (4.1.1)
and python 2.6.6