The elasticsearch_exporter is a Prometheus exporter written in Go that collects and exposes metrics from Elasticsearch and OpenSearch clusters. It enables monitoring of various Elasticsearch statistics by converting them into Prometheus-compatible metrics that can be scraped and visualized through Prometheus and Grafana.
The exporter supports all currently supported versions of Elasticsearch and OpenSearch, with the project making reasonable attempts to maintain compatibility with previous versions while prioritizing code maintainability. Where Elasticsearch and OpenSearch diverge in functionality, the exporter attempts to maintain compatibility with both platforms, though some collectors may only work with one or the other.
The project offers flexible deployment options including pre-built binaries available through GitHub releases, Docker containers via docker-compose, and Kubernetes deployments through a Helm chart maintained in the prometheus-community charts repository. Configuration is handled through command-line arguments and environment variables, with options to control which metrics are collected, connection parameters, authentication methods, and scraping behavior.
Key configuration options include the ability to query stats for all nodes in a cluster rather than just a single node, collect statistics for all indices, retrieve index settings and mappings, include alias information, query index lifecycle policies, collect snapshot statistics, and retrieve data stream states. The exporter also supports various authentication methods including basic authentication, API keys, AWS SigV4 signing for Amazon OpenSearch Service, and TLS client certificate authentication. SSL verification can be skipped when necessary, and timeouts can be configured to prevent excessive load on Elasticsearch master nodes.
From version 2.X onward, the exporter supports multi-target scraping through a /probe endpoint, allowing a single running instance to monitor multiple Elasticsearch clusters. This feature supports multiple authentication module types including userpass, apikey, aws, and tls, each with configurable options that can be defined in a YAML configuration file.
Common issue labels include help wanted, bug, and enhancement requests.
The exporter provides comprehensive metrics documentation and includes example Prometheus alert rules, recording rules, and a Grafana dashboard for visualization. It requires specific Elasticsearch security privileges depending on which collectors are enabled, with detailed documentation provided for Elasticsearch 7.x RBAC configuration. The project is maintained by the Prometheus Community and is available under an open-source license.