Configurable Prometheus exporter for results of Elasticsearch queries
Project description
promesque is a configurable Prometheus exporter for results of Elasticsearch queries.
Installation
pip3 install 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.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1d185d4a92e0eac4cf680d70a28be1732a76c04d5b9dbc83b91672476654e50 |
|
MD5 | b213384705fae33c56e598549f655bfc |
|
BLAKE2b-256 | 5e5ea9894ade2986bb4c77c9d4d79fdeffe230594242a75286b6bcad6c78cc6e |