Installation

Installing Graphite

Step 1 - Get ExtJS

To install graphite, you will first need to download the ExtJS SDK from http://www.extjs.com/. Extract it somewhere and it will create an ext-VERSION/ subdir.

Step 2 - Run install.py

Run the install script like so:

python install.py —extjs=/path/to/ext-VERSION

This will check for graphite's runtime dependencies and let
you know which you are missing. Download and install these modules and re-run
install.py until it detects all the required modules.

Graphite requires:

  • python2.4 or greater
  • pycairo (with PNG backend support)
  • mod_python
  • django
  • 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)

Once install.py has completed, graphite will be installed in
/usr/local/graphite (unless you specified —install-root). It will also
create a "graphite-vhost.conf" file in the current directory. You can use
this to configure apache.

Step 3 - Configure Apache

First off, Apache has to have mod_python configured, this is usually done
by including a line like the following in your httpd.conf:

LoadModule python_module    modules/mod_python.so

Second 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 the graphite-vhost.conf file that install.py created
into the vhosts.d/ directory (or whatever directory your system uses) and
apache is ready.

The second approach is to copy the contents of the graphite-vhost.conf file
and insert it down at the end of your httpd.conf.

Step 4 - Initial Database Creation

You must tell Django to create the database tables used by the graphite webapp.
This is very straight forward, especially if you are using the default sqlite
setup.

NOTE: If you are using a custom database backend (other than sqlite) you must
first create a $GRAPHITE_ROOT/web/local_settings.py file that overrides the
database related settings from settings.py.

Assuming you are using the default setup, the database is initialized like so:

cd /usr/local/graphite/web/
sudo python manage.py syncdb
# you will be prompted to create an admin user, this is a good idea

# now you must change ownership of the database file to the user apache runs as
sudo chown -R nobody:nobody /usr/local/graphite/storage/ #assuming apache runs as 'nobody'

Similarly if you use a backend such as mysql or postgres, the DATABASE_USER
you create in your local_settings.py must have permission to create
tables under the database named by DATABASE_NAME.

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 /usr/local/graphite/web/local_settings.py

Also remember that the apache logs for the graphite webapp are in
/usr/local/graphite/storage/logs/

Next Steps

Now you have finished installing graphite, the next thing to do is put some
real data into it. This is accomplished by running the carbon-agent.py daemon
and send it some data as demonstrated in the included
./examples/example-client.py

Read more Getting your data into Graphite.

page_revision: 0, last_edited: 1210192831|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License