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

Reporting ILM policy #81544

Closed
kobelb opened this issue Oct 22, 2020 · 10 comments · Fixed by #104303
Closed

Reporting ILM policy #81544

kobelb opened this issue Oct 22, 2020 · 10 comments · Fixed by #104303
Assignees
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead (Deprecated) Team:Reporting Services Use Team:SharedUX and one of the Feature:Reporting:* labels instead. enhancement New value added to drive a business result impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:SystemIndices

Comments

@kobelb
Copy link
Contributor

kobelb commented Oct 22, 2020

Currently, Reporting manually creates a weekly .reporting-${date} index. Since these are normal dot-prefixed indices, users can create an index template that specifies an ILM policy or they can manually delete older .reporting-${date} indices.

However, starting in 8.0 after Reporting has switched to use system-indices, end-users will no longer be able to create index templates or manually delete older .reporting-${date} indices. However, we want to provide them with a method of configuring a retention policy for their reports.

To address this limitation, the Reporting plugin should do three things:

  1. On start-up, create a kibana-reporting ILM policy with the default phases
  2. When creating new .reporting-${date} indices, specify the index.lifecycle.name: kibana-reporting setting.
  3. Integrate with the 8.0 Upgrade Assistant to update all existing .reporting-* indices to have the index.lifecycle.name: kibana-reporting. This can be done in bulk per the docs.

This will allow the user to use the ILM management UI in Kibana to configure the phases for their Reporting system-indices. This isn't a perfect solution, as end-users can delete the kibana-reporting ILM policy and then on start-up Kibana will recreate it. However, we have this existing limitation with ILM policies that are created by default already.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@kibanamachine kibanamachine added this to To triage in kibana-app-arch Oct 22, 2020
@kobelb kobelb mentioned this issue Oct 22, 2020
5 tasks
@kobelb
Copy link
Contributor Author

kobelb commented Oct 22, 2020

/cc @jaymode @gwbrown

@tsullivan
Copy link
Member

Do you all anticipate us only needing to allow users to configure the maximum index size and the maximum age for the .reporting-* indices

This sounds good to me - I'm not sure the users would need more than that

@tsullivan tsullivan added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Dec 17, 2020
@tsullivan tsullivan moved this from To triage to Medium Horizon in kibana-app-arch Dec 17, 2020
@kobelb kobelb removed the discuss label Jan 29, 2021
@kobelb
Copy link
Contributor Author

kobelb commented Jan 29, 2021

@ppisljar can we get this added to the App Services team roadmap to be implemented by 8.0?

@tsullivan tsullivan added the (Deprecated) Team:Reporting Services Use Team:SharedUX and one of the Feature:Reporting:* labels instead. label Feb 25, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@tsullivan tsullivan added the enhancement New value added to drive a business result label Feb 25, 2021
@kobelb kobelb changed the title Reporting system-index retention policy Reporting ILM policy Apr 7, 2021
@kobelb
Copy link
Contributor Author

kobelb commented Apr 7, 2021

@tsullivan, I've updated the issue description based on recent input from @jaymode and some research of my own.

@tsullivan tsullivan self-assigned this Apr 23, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort loe:large Large Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Apr 26, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:large Large Level of Effort labels May 5, 2021
@petrklapka petrklapka added the 1 label May 6, 2021
@tsullivan
Copy link
Member

tsullivan commented Jun 1, 2021

  1. Integrate with the 8.0 Upgrade Assistant to update all existing .reporting-* indices to have the index.lifecycle.name: kibana-reporting. This can be done in bulk per the docs.

It is possible that the user may have defined a custom ILM policy for reporting indices. I have recommended this before: https://discuss.elastic.co/t/deleting-old-reporting-index/273684/3?u=tsullivan

Question: How do we prevent a built-in policy from conflicting with a custom policy the user may have defined before 7.14? Would it be a problem if there are so-called conflicting policies, meaning: mulitple ILM policies that apply to the same pattern of indices?

cc @kobelb @jloleysens @lhuet

@jloleysens
Copy link
Contributor

jloleysens commented Jun 2, 2021

Great point @tsullivan! I'd like to unpack "How do we prevent a built-in policy from conflicting with a custom policy" a bit further.

As I understand it the policy that is set in the index settings will override any policy that may be set by an index template. Therefore the "conflict" may be that old indices don't have this value set and are governed by a previous, custom policy where new indices are governed by our provisioned policy. Is this what you had in mind re "conflict"?

If so, I believe this is where the Upgrade Assistant deprecation notice is intended to assist users. There is still a possibility that indices are governed by different policies for a time. I believe this is something we could address in the UI: enable users to link to the reporting ILM policy (view it/update it), re-create it, or update their existing indices to be managed by the same policy (same action that would be performing from UA). I think there are 3 states that need to be reflected to the user (if ILM is enabled):

  1. Conflicting (inconsistent) ILM policies on reporting indices

Screenshot 2021-06-02 at 10 44 30

  1. Reporting ILM policy does not exist

Screenshot 2021-06-02 at 10 35 42

  1. Reporting policy exists and is uniformly set on all reporting indices (base case)

Screenshot 2021-06-02 at 10 43 23

What do you think?

@tsullivan
Copy link
Member

@jloleysens the options all look achievable, and I like that you've thought further with # 2, that the user may have deleted the the kibana-reporting policy and could need a way to restore it.

What do you think?

I think it will work, and looks good.

@tsullivan
Copy link
Member

@jloleysens take a look at this issue as well - #101438 our built-in policies will have an indication that they are managed in the listing page for policies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead (Deprecated) Team:Reporting Services Use Team:SharedUX and one of the Feature:Reporting:* labels instead. enhancement New value added to drive a business result impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort Project:SystemIndices
Projects
kibana-app-arch
  
Done in current release
6 participants