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

Add configurable number of 'most recent' date-stamped indices to gather in Elasticsearch input #8543

Merged
merged 3 commits into from
Dec 21, 2020

Conversation

ivorybilled
Copy link
Contributor

Add configurable number of 'most recent' date-stamped indices to gather in the Elasticsearch input plugin, and allow wildcards to account for date-suffixed index names. Configuring '3' for num_most_recent_indices will only gather the 3 latest indices, based on the date or number they end with. Finding the date or number is dependent on the targeted indices being configured with wildcards at the end of their 'base' names.

closes #8517

…er in elasticsearch plugin, and allow wildcards to account for date-suffixed index names.aksdjfaidfja
@sjwang90 sjwang90 added area/elasticsearch feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Dec 11, 2020
Copy link
Contributor

@ssoroka ssoroka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'd like to change to our built-in glob library

plugins/inputs/elasticsearch/elasticsearch.go Outdated Show resolved Hide resolved
@ivorybilled ivorybilled merged commit c47fcf6 into master Dec 21, 2020
@ivorybilled ivorybilled deleted the getMostRecentElasticIndices branch December 21, 2020 16:45
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
…er in Elasticsearch input (influxdata#8543)

Add configurable number of 'most recent' date-stamped indices to gather in the Elasticsearch input plugin, and allow wildcards to account for date-suffixed index names. Configuring '3' for num_most_recent_indices will only gather the 3 latest indices, based on the date or number they end with. Finding the date or number is dependent on the targeted indices being configured with wildcards at the end of their 'base' names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/elasticsearch feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add configuration option to elasticsearch input to collect only the most recent fields
3 participants