Skip to main content

Graphite-web, without the interface. Just the rendering HTTP API.

Project description

Build Status Coverage Status

Graphite-web, without the interface. Just the rendering HTTP API.

This is a minimalistic API server that replicates the behavior of Graphite-web. I removed everything I could and simplified as much code as possible while keeping the basic functionality.

Implemented API calls:

  • /metrics/find
  • /metrics/expand
  • /metrics/search (removed strange keep_query_pattern parameter)
  • /render


  • /dashboard/find
  • /dashboard/load/<name>
  • /events/get_data

Difference from graphite-web

  • Stateless. No need for a database.
  • No caching. Rendering is live.
  • No Pickle.
  • Graphite-web has a history of accepting URLs with or without a trailing slash. Graphite-API only supports URLs with no trailing slash.
  • JSON data in request bodies is supported, additionally to form data and querystring parameters.
  • Ceres integration will be as an external backend.
  • Compatibility with python 2 and 3.
  • Easy to install and configure.


  • Solid codebase. Strict flake8 compatibility, good test coverage.
  • Ease of installation/use/configuration.
  • Compatibility with the original Graphite-web API.


  • Support for very old Python versions.
  • Built-in support for every metric storage system in the world. Whisper is included by default, other storages are added via 3rd-party backends.


git clone
cd graphite-api
sudo python install

Alternatively, you can run install as a normal user, in a virtualenv.


The default config file path is /etc/graphite-api.conf. The format is YAML.

search_index: /srv/graphite/index
    - /srv/graphite/whisper
time_zone: Europe/Berlin

If you need the configuration file to be at a different location, you can set the GRAPHITE_API_CONFIG environment variable to the location you want.

Storage finders

Graphite-API can read from any metrics store as long as it has a compatible storage finder. Finders can be configured this way:

  - graphite_api.finders.whisper.WhisperFinder
  - cyanite.CyaniteFinder

Multiple finders are allowed.


Custom functions can be added to extend the built-in grammar. The default functions are:

  - graphite_api.functions.SeriesFunctions
  - graphite_api.functions.PieFunctions


With Gunicorn or any WSGI server. The WSGI application is located at

sudo pip install gunicorn


Tox is used to run the tests for all supported environments. To get started from a fresh clone of the repository:

pip install tox

Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page