Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

151 lines (107 sloc) 6.131 kb
Graphite used to require an external Ext installation but now Ext is bundled
with Graphite as allowed by the Ext FLOSS license exemption described here:
This will check for graphite's runtime dependencies and let
you know which you are missing. Download and install these modules and re-run until it detects all the required modules.
Graphite requires:
python2.4 or greater (python 2.5 or greater is required for AMQP support)
whisper (available for download on the graphite project page)
pycairo (with PNG backend support)
json (standard in python2.6) or simplejson
mod_wsgi (optional, recommended) or mod_python (optional)
python-ldap (optional - needed for ldap-based webapp authentication)
python-memcached (optional - needed for webapp caching, big performance boost)
python-sqlite2 (optional - a django-supported database module is required)
Twisted (required only for carbon)
First take a look at the 'prefix' option in the setup.cfg file. This specifies
where the graphite application will be installed. Note that if you plan on
installing carbon on the same server you should use the same prefix for it.
The prefix where graphite is installed under where be referred to as
$GRAPHITE_ROOT from here on.
Also, do NOT change the 'install-lib' option unless you really know what
you are doing.
Initialize the Database
Once you have installed graphite you must initialize its database like so:
cd $GRAPHITE_ROOT/webapp/graphite/
sudo python syncdb
Note that if you wish to use a custom database setup (like MySQL or Postgres)
you will need to make those configuration changes first. See the "Custom
Database Configuration" section below for details.
Setup Filesystem Ownership
The user that apache runs as will need write access to the following directories:
As well as write access to the following files:
The apache user must also have read access to $GRAPHITE_ROOT/storage/whisper/
Apache Configuration
When using apache there are two modules available to provide support for python
web application.
Graphite currently provides example configurations for both of these modules.
Of the two mod_wsgi is the most up to date and actively maintained so it's
highly recommended if you are starting afresh.
Apache Configuration for Mod_wsgi (recommended)
If you are using mod_wsgi, Apache has to have mod_wsgi configured,
this is usually done by including a line like the following in your
LoadModule wsgi_module modules/
Apache Configuration for Mod_python
If you choose to use mod_python, Apache has to have mod_python configured,
this is usually done by including a line like the following in your
LoadModule python_module modules/
General Apache Configuration
Once you have configured the apache module you are using you should configure
a vhost for graphite (technically it doesn't have to be a vhost but its good
practice). This can be done one of two ways.
The first way (highly preferred) is to include independent vhost configs.
# This goes in httpd.conf
Include /usr/local/apache2/conf/vhosts.d/*.conf
Then simply drop your graphite vhost conf file into the vhosts.d/ directory
(or whatever directory your system uses) and apache is ready. You can use
either of the example vhost confs as a starting point (See the examples
directory of this package and choose the correct one based on whether you
are using mod_wsgi or mod_python.)
The second approach is to copy the contents of your chosen graphite vhost conf file
and insert it down at the end of your httpd.conf.
Custom Database Configuration
By default, the graphite webapp uses a sqlite database. As long as you have the
appropriate sqlite module installed, you should not need to do any additional
database configuration. But if you wish to use a different database such as
MySQL or Postgres, read on.
After you setup your database server, create a database and a user with full
privileges on that database. Now we put that information into the graphite
webapp file.
Edit the $GRAPHITE_ROOT/webapp/graphite/
In particular you will need to uncomment and modify all of the settings
that begin with "DATABASE_". Once you have done this, we need to tell
Django to create our tables.
cd $GRAPHITE_ROOT/webapp/graphite/
sudo python syncdb
# you will be prompted to create an admin user, this is a good idea
Restart apache and you should see the graphite webapp on the main page.
If you encounter problems, you can increase the verbosity of error output
by adding a "DEBUG = True" line to
Next Steps - setup the backend (carbon)
Now you have finished installing the graphite webapp, the next thing to do is put some
real data into it. This is accomplished by running the daemon
and send it some data as demonstrated in the included
Instructions for doing this in the README file.
Jump to Line
Something went wrong with that request. Please try again.