Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Elasticsearch stats exporter for Prometheus

License

Notifications You must be signed in to change notification settings

echocat/elasticsearch_exporter

 
 

Repository files navigation

Elasticsearch Exporter

Export Elasticsearch service health to Prometheus.

To run it:

make
./elasticsearch_exporter [flags]

Flags

./elasticsearch_exporter --help
  • es.uri: Address (host and port) of the Elasticsearch node we should connect to. This could be a local node (localhost:8500, for instance), or the address of a remote Elasticsearch server.
  • es.all: If true, query stats for all nodes in the cluster, rather than just the node we connect to.
  • es.timeout: Timeout for trying to get stats from Elasticsearch. (ex: 20s)
  • es.ca: Path to PEM file that conains trusted CAs for the Elasticsearch connection.
  • es.client-private-key: Path to PEM file that conains the private key for client auth when connecting to Elasticsearch.
  • es.client-cert: Path to PEM file that conains the corresponding cert for the private key to connect to Elasticsearch.
  • web.listen-address: Address to listen on for web interface and telemetry.
  • web.telemetry-path: Path under which to expose metrics.
  • web.tls-cert: Path to PEM file that conains the certificate (and optionally also the private key in PEM format). This should include the whole certificate chain. If provided: The web socket will be a HTTPS socket. If not provided: Only HTTP.
  • web.tls-private-key: Path to PEM file that contains the private key (if not contained in web.tls-cert file).
  • web.tls-client-ca: Path to PEM file that conains the CAs that are trused for client connections. If provided: Connecting clients should present a certificate signed by one of this CAs. If not provided: Every client will be accepted.

NOTE: We support pulling stats for all nodes at once, but in production this is unlikely to be the way you actually want to run the system. It is much better to run an exporter on each Elasticsearch node to remove a single point of failure and improve the connection between operation and reporting.

Elasticsearch 2.0

Parts of the node stats struct changed for Elasticsearch 2.0. For the moment we'll attempt to report important values for both.

  • indices.filter_cache becomes indices.query_cache
  • indices.query_cache becomes indices.request_cache
  • process.cpu lost user and sys time, so we're now reporting total
  • Added process.cpu.max_file_descriptors