elasticsearch_exporter icon indicating copy to clipboard operation
elasticsearch_exporter copied to clipboard

add new options to specify list of exported indices

Open msvechla opened this issue 4 years ago • 1 comments

Hi,

First of all thanks for this awesome project!

As the /_all/_stats and /_all/_settings requests can be resource extensive, this PR adds options to specify a comma separated list of indices or wildcard index expressions, based on which the list of to be exported indices is determined.

This works in the same way as the <index> parameter here: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html

Options Added:

es.indices-list (default: *)
es.indices_settings-list (default: *)

As the existing settings es.indices and es.indices_settings are still used to toggle the general behaviour and the list defaults are the * wildcard, this is a backwards-compatible feature.

Let me know if this is fine, or if there is anything else that needs to be adjusted. Thanks for your help!

msvechla avatar May 25 '20 22:05 msvechla

I can't speak to the particulars of the implementation done here, but as a feature this is something I think would be useful to include. We have thousands of indices across multiple clusters, but our use case only needs index specific metrics for a few of the largest indices.

ebernhardson avatar Nov 10 '20 20:11 ebernhardson