https://github.com/ipstatic/es_search_exporter
Elasticsearch search exporter for the Prometheus monitoring system
https://github.com/ipstatic/es_search_exporter
Last synced: 10 months ago
JSON representation
Elasticsearch search exporter for the Prometheus monitoring system
- Host: GitHub
- URL: https://github.com/ipstatic/es_search_exporter
- Owner: ipstatic
- License: other
- Created: 2016-08-16T12:14:34.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2021-03-25T21:47:07.000Z (over 5 years ago)
- Last Synced: 2025-06-02T09:09:18.086Z (about 1 year ago)
- Language: Python
- Size: 7.81 KB
- Stars: 13
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Elasticsearch Search Exporter
This is an exporter that allows you to execute queries against an Elasticsearch
cluster and return the number of documents found for use by the
[Prometheus](https://prometheus.io) monitoring system.
## Installation
```
pip install es_search_exporter
```
### ES Search Exporter Configuration
You will need to add your Elasticsearch query to the searches hash in es_search.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).
### Prometheus Job Configuration
```
scrape_configs:
- job_name: 'es_search_exporter'
static_configs:
- targets:
- elastichost.example.com
params:
search: ['example']
relabel_configs:
- source_labels: [__address__]
regex: (.*?)(:80)?
target_label: __param_address
replacement: ${1}
- source_labels: [__param_address]
regex: (.*)
target_label: instance
replacement: ${1}
- source_labels: []
regex: .*
target_label: __address__
replacement: 127.0.0.1:9920 # ES Search Exporter
```
## Developing Locally
To work on this locally without installing the package, execute:
```
./scripts/run_locally --kerberos --tls
```
This script will setup your path correctly and run the exporter.