Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add capability to collect metrics from selected indices #321

Open
jacmath opened this issue Sep 8, 2021 · 5 comments
Open

Comments

@jacmath
Copy link

jacmath commented Sep 8, 2021

Hi,
Currently there is only an option to disable the metric collection for indices as a whole using the setting prometheus.indices: false. Is it possible to add support to collect metrics only for a limited set of indices?

Once the number of indices grow above 50 or so, we are seeing metrics collection is taking long resulting in gaps in the metrics scraped by Prometheus. In such cases, it would be nice to be able to monitor metrics for a few critical indices instead of disabling it completely.

Thanks
Jacob Mathews

@lukas-vlcek
Copy link
Collaborator

Hello Jacob,

this is actually very good point. Right now it is only possible to enable or disable indices metrics. But as you point out this is far from ideal. Actually, prometheus can have problems (label explosion) when number of indices grow beyond certain level as well.

How would you like to specify which indices the metrics should be collected from?

@jacmath
Copy link
Author

jacmath commented Sep 21, 2021

Hi Lukas,
Thanks for looking into this request.
Is it possible to supply the list of indices for which metrics need to be collected as a string with comma-separated list of index names (possibly with wildcards).
For example,
"logstash*,events*,.kibana_1"

Regards
Jacob Mathews

@lukas-vlcek
Copy link
Collaborator

Hi Jacob,
this means we will need to introduce a new configuration field into elasticsearch.yml that will hold this string (or an array that will be turned into this string). I can imagine this could work. I can even imagine we can make this field dynamically updatable so that users will have the option to change the list of indices on the fly.
WDYT?
Lukáš

@jacmath
Copy link
Author

jacmath commented Sep 21, 2021

Yes, this looks like a very good proposal.

@jacmath
Copy link
Author

jacmath commented Aug 30, 2022

Hi Lukas,
Any chance of getting this capability added to the exporter?
Thanks
Jacob Mathews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants