Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

promesque-0.0.3-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file promesque-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: promesque-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.10

File hashes

Hashes for promesque-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0bf03f5e1104b416e25e11e629b410749104f1d26364528bba015ffa07764f4
MD5 44bf3975b2ccb0c9d05fa20abcbb8fa0
BLAKE2b-256 48ca94bc63a089eeb9c4e4b346aea3c98626db9d11c080227059abbcd5e7a22e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page