Skip to content

Match .kibana index and don't clean them up #12

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

Closed
wants to merge 1 commit into from
Closed

Match .kibana index and don't clean them up #12

wants to merge 1 commit into from

Conversation

pathikritmodak
Copy link

From version 6.5.0 kibana indexes are being stored as .kibana_1 .. kibana_N
Hence regexmatching indexes which start as .kibana, as with the current approach they get deleted and you lose your saved objects
https://www.elastic.co/guide/en/kibana/current/upgrade-migrations.html

From version 6.5.0 kibana indexes are being stored as .kibana_1 .. kibana_N
Hence regexmatching indexes which start as .kibana, as with the current approach they get deleted and you lose your saved objects
https://www.elastic.co/guide/en/kibana/current/upgrade-migrations.html
@Nuru
Copy link
Contributor

Nuru commented Oct 11, 2019

The issue of what to do with the .kibana_N indexes is not clear cut. The Kibana 6.5 docs suggest that you will accumulate multiple indexes over time (.kibana_1, .kibana_2, .kibana_3, ...) and may or may not want to keep older versions to enable rolling back to previous versions.

This PR proposes never deleting any .kibana_N indexes, which is unlikely to be the right thing to do. By the time someone is at .kibana_5 they probably can do without .kibana_1. Maybe this lambda should never delete them, and users should be forced to delete them manually, or maybe not.

(Also, the regex used by this PR is overbroad, but that is a minor thing compared to actually figuring out the correct desired behavior.)

The solution upstream is to explicitly list which indexes to skip when specifying delete all. That is dodgy, in that it makes it most likely that the newest and in-use index could get deleted if you forget to update the skip list first.

For now, #14 excludes .kibana_1, but we still recommend explicitly listing which indexes to delete (e.g. "logstash") instead.

I will leave this issue open for further discussion, for now at least.

@jamengual jamengual closed this Sep 9, 2020
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.

3 participants