Configurable Prometheus exporter for results of Elasticsearch queries
Project description
promesque is a configurable Prometheus exporter for results of Elasticsearch queries.
Installation
pip install -e https://github.com/croesnick/promesque
Usage
promesque path/to/some/config.yml --log-level info
Refer to exporter_es.yml as an example for such a config. The supported fields are explained below.
Configuration File
Configuration file is in a yaml format with single configuration scope (metrics).
Each item in metrics scope define a metric and must have following attributes:
description: description of a metric (what it does)
data_path: jsonpath to data buckets in Elasticsearch response to build metrics from (default: $)
value_path: jsonpath to metric value within data bucket
- labels: inner scope with name: reference for each metric:
name: name of label exposed by exporter
reference: jsonpath to label value within data bucket
url: url to Elasticsearch cluster (include index)
- query: query in json format; must
either be inclosed in single quotes (e.g. '{ "query": {...} }')
or written in YAML block notation with proper indentation, e.g.,
es_query: | { "query": { ... } }
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for promesque-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5537636e1655e4b111d2a957cf1741aa66cec101ea5f6d46ffff50cde91c8d00 |
|
MD5 | bf1e88b5ae4a9fc7a0af177375bfd54b |
|
BLAKE2b-256 | 860a16f84a2e550298c9b9de7504af029828fd41cc8dbeac9dad5b77fb60ea59 |