Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add changes if carbon-cache.py is not run as root

...

My starting directory looks like.

> ll /Users/fedora_user/graphite_downloads] 
> ll
total 0
drwxr-xr-x  19 fedora_user  staff  646  5 Sep 12:31 carbon
drwxr-xr-x  23 fedora_user  staff  782  4 Sep 15:37 graphite-web
drwxr-xr-x  10 fedora_user  staff  340  5 Sep 08:58 whisper

...

  • If you are using the default sqlite3 database, create an administrator username/password when prompted and then re-open local_settings.py, un-comment the DATABASES variable and add the administrator username/password to the DATABASES variable.
  • If you receive an error "ImportError: cannot import name execute_manager", you have an old version of graphite-web that requires Django 1.4. Get the latest changes from the GitHub repositories.

If you Make sure that the entire storage directory (default /opt/graphite/storage) and all files are owned by the webserver process.

Start Data Collector

cd /opt/graphite/bin/
sudo python carbon-cache.py start
Password:
Starting carbon-cache (instance a)

...

in /opt/graphite/conf/carbon.conf but this will not harm the running process and does not need to be disabled.

Stronger security

Note: If you are not running the carbon-cache.py daemon as root, then you will need to make the storage directory writable by whichever user you will run carbon-cache.py as.

For example: If you are running Apache as www-data and the carbon-cache.py as ubuntu then your /opt/graphite/storage directory will look like:

> ll /opt/graphite/storage
total 104
drwxr-xr-x 6 www-data www-data  4096 Sep  8 21:50 ./
drwxr-xr-x 8 ubuntu   root      4096 Sep  8 21:42 ../
-rw-r--r-- 1 www-data www-data     5 Sep  8 21:46 carbon-cache-a.pid
-rw-r--r-- 1 www-data www-data 69632 Sep  8 21:50 graphite.db
-rw-r--r-- 1 www-data www-data   762 Sep  8 21:50 index
drwxr-xr-x 2 www-data www-data  4096 Sep  8 21:40 lists/
drwxr-xr-x 4 www-data www-data  4096 Sep  8 21:46 log/
drwxr-xr-x 2 www-data www-data  4096 Sep  8 21:40 rrd/
drwxr-xr-x 5 ubuntu   www-data  4096 Sep 10 18:19 whisper/

This will allow carbon-cache.py to add new metrics and the web application access to read them.

Restart Apache

If all is well then browsing to your webserver's homepage should look something like this.

...