Skip to content

Index Lifecycle Management Support #805

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

Merged
merged 19 commits into from
Dec 13, 2018
Merged

Conversation

robbavey
Copy link
Contributor

@robbavey robbavey commented Oct 29, 2018

  • Add configuration options to plugin
  • Implement basic Index Lifecycle Management support
  • Create default policy, and add if specified
  • Check gracefully handles oss with ILM and pre-ILM versions of Elasticsearch
  • Add integration tests
  • Add License enforcement
  • Add docs . (will do this in a separate PR)
  • Check todos, and clean up code

Resolves #798

@robbavey robbavey force-pushed the wip_ilm branch 2 times, most recently from eedf68d to e6bb923 Compare November 12, 2018 15:24
@LucaWintergerst
Copy link

I was wondering if this would also support dynamic index names based on a field of an event, but from what Rob told me this is not possible right now:
ilm_write_alias => “%{foobar}”

How bad of an idea would it be to do something like the following to support it being dynamic?

my_index_name = event.sprintf(@ilm_index_name_field)
if !@@my_ilm_indices.include?(my_index_name)
  maybe_create_write_alias
  maybe_create_ilm_policy
  @@my_ilm_indices.push(my_index_name)
end

The following issues come to mind:

  • logstash is stateless and would have to collect the list of known patterns over and over again after each restart. We could mitigate this by adding an initial list for known indices where we would add aliases and ILMs at startup
  • it hurts the performance as we have to check this for every event
  • the array could grow too large and break something. I suppose we could add soft limits to restrict it to a max size
  • likely a whole lot more

Just wanted to bring it up as a lot of users rely on the dynamic index creation based on event data

@robbavey robbavey changed the title [WIP] Index Lifecycle Management Support Index Lifecycle Management Support Dec 4, 2018
@robbavey robbavey force-pushed the wip_ilm branch 4 times, most recently from bfa6e40 to 0fd8594 Compare December 6, 2018 18:43
@jsvd jsvd requested a review from colinsurprenant December 11, 2018 21:42
Copy link

@guyboertje guyboertje left a comment

Choose a reason for hiding this comment

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

LGTM

@robbavey
Copy link
Contributor Author

Thanks @guyboertje!

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

Successfully merging this pull request may close these issues.

4 participants