Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: database instructions and mvn -D switch

...

# Logging
LOG_RENDERING_PERFORMANCE = True
LOG_CACHE_PERFORMANCE = True
LOG_METRIC_ACCESS = True
  • Find the DATABASES variable and uncomment it.
  • If you are not using a sqlite3 database, find the DATABASES variable and change the ENGINE parameter and add required parameters (username, password, hostname, port).
  • Save the file.

Create the database

cd /opt/graphite/webapp/graphite

sudo python manage.py syncdb
  • Create If using the default sqlite3 database, create an administrator username/password when prompted to .

...

  • and then re-open local_settings.py and add the administrator username/password to the DATABASES variable.

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

This starts the listener on localhost:2003, this can be configured in /opt/graphite/conf/carbon.conf.

Restart Apache

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

Connecting Fedora

To enable Metrics reporting to Graphite, activate the Spring profile metrics.graphite. The system properties fcrepo.metrics.host (defaults to localhost) and fcrepo.metrics.port (defaults to 2003) can also be set. 

When testing with Maven use

 

MAVEN_OPTS="-Xmx1024mXmx512m -Dspring.profiles.active='metrics'.graphite" mvn jetty:run

 

or add it to the web.xml

...

<context-param>
  <param-name>spring.profiles.active</param-name>
  <param-value>metrics<value>metrics.graphite</param-value>
</context-param>

...