es-data-exporter

Elasticsearch data exporter to the Prometheus .


Keywords
prometheus, exporter, network, monitoring, elastic, search
License
MIT
Install
pip install es-data-exporter==0.1.4

Documentation

Elasticsearch Data Exporter

Installation

pip install es_data_exporter

Run in docker

docker run -it --name es_data_exporter -p 9145:9145 --rm -v config.yml:/config.yml kasen/es_data_exporter --config=/config.yml

ES Search Exporter Configuration

You will need to add your Elasticsearch query to the searches hash in es.yml. This could also be a JSON file as well if that would make it easier (JSON is valid YAML, and most tools like Kibana can produce a JSON version of your query).

Support full es query!

Prometheus Job Configuration

scrape_configs:
  - job_name: 'es_data_exporter'
    params:
      search: ['example']
    relabel_configs:
      - source_labels: [__address__]
        regex: (.*?)(:80)?
        target_label: __param_target
      - source_labels: []
        regex: .*
        target_label: __address__
      - source_labels: [__address__]
        regex: (.*)
        target_label: instance 

Developing Locally

To work on this locally without installing the package, execute:

./scripts/run --kerberos --tls

This script will setup your path correctly and run the exporter.