distributed-system-analysis/es-graphite-shim

Name: es-graphite-shim

Owner: distributed-system-analysis

Description: An ElasticSearch / Graphite shim which translates graphite requests into ElasticSearch data queries for a given mapping

Created: 2015-06-23 02:04:12.0

Updated: 2018-05-16 03:42:58.0

Pushed: 2016-02-19 20:06:18.0

Homepage: null

Size: 219

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

es-graphite-shim

Shim for mocking Graphite instance through ElasticSearch, for Grafana.

INSTALLATION

Refer to INSTALL-NOTES for help on installing this script.

Or you could just build the Dockerfile included here and fire the container. Instructions for building and starting the container, are included in the Dockerfile. Before that, make sure you have copied conf/local_settings_example.py into conf/local_settings.py and edited the params as required. Help on editing those parameters is given under INSTALL-NOTES

datasources: { graphite: { type: 'graphite', url: ““, timezone: 'Asia/Kolkata', }, elasticsearch: { type: 'elasticsearch', url: ““, index: 'grafana-dash', grafanaDB: true, } },

..

`timezone` option under `datasources.graphite` has to be mentioned
ase the timezone offsets differ. This normally has to be same as the
mentioned under `local_settings.py` (change this line: `TIME_ZONE` = '')

USAGE

un this in development mode, just like any other
go project would be executed.

Or, you might deploy this on a production server. For this, refer to the sample apache based deployment help guide included within the source code, in a file called INSTALL-NOTES and sample apache config under conf/graphite_shim.conf.example

Following that, on homepage, you will see some sample links.

There are two categories of the shim API, as follows:

  1. Render Query Type: Here, the metric_path is a DOT (.) separated path (similar to graphite) that specifies the path of the query metrics, as per the hierarchy. This may be:

  2. Format: `/render/?target={{metric_path}}&from={{epoch_from}}&until={{epoch_until}}&format=json`

    ..where metric_path is: `metric1.sub_metric1.sub_sub_metric1. <and so on>`

  3. The `from=and ``until=``` fields specify the time durations between which the query is to be performed.

  4. Please note, for demonstration purposes, a sample query has been provided in the homepage HTML file. The params provided to it, come from within the views.py file under

  5. Metric Search Query Type: Here, when * is given, all the parent nodes in the metric path hierarchy are displayed as a result, along with information like, whether its a leaf node or not.

  6. Format: `/metrics/find?query=*`

LICENSE

Refer to the file 'LICENSE'.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.