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

Kibana does not remove index template for removed data streams on integrations upgrade #13181

Open
endorama opened this issue May 17, 2024 · 3 comments

Comments

@endorama
Copy link
Member

endorama commented May 17, 2024

When we will migrate from apm integration package to apm-data ES plugin we will need to trigger a removal of index templates created by the integration, which by default are created with a higher priority than the one created by the ES plugin.

To ensure this steps works I run a test to verify if Kibana removes index template when upgrading an integration where installed data streams have been removed. I tested these steps:

  1. setup a Es+Kibana stack and install apm integration package (tested with 8.15.0-SNAPSHOT but any current version should lead to same results)
  2. check installed Index Templates
  3. install a custom version of apm integration package where all data streams except one (traces - due to how elastic-package works is not possible to package an integration without at least 1 data stream; this is not relevant for this test but should be investigated to proceed further with the migration) have been removed
  4. Verify if Index Templates for removed data streams have been removed.

The test showed that Index Templates are not removed. This is a blocker for #11529 as templates from the plugin would be overridden by the integration package templates.

Assets difference between packages

Assets with normal integration package:
2024-05-16_16-06

Assets with custom integration package:
2024-05-16_16-08

Index templates before installing custom version

image
image

Index templates after installing custom version

Screenshot 2024-05-16 at 16-09-02 Index Management - Elastic
Screenshot 2024-05-16 at 16-09-10 Index Management - Elastic

@axw
Copy link
Member

axw commented May 21, 2024

The test showed that Index Templates are not removed. This is a blocker for #11529 as templates from the plugin would be overridden by the integration package templates.

We can unblock ourselves by increasing the priority of the templates in the apm-data plugin: #11529 (comment)

Not ideal, but I think that's likely the most expedient approach. We should still go ahead with removing the data streams from the integration package, the existing templates just won't be removed. If need be, we could add some code to Kibana to remove them for APM specifically.

@endorama
Copy link
Member Author

We moved forward with increasing the priorities in elastic/elasticsearch#108885

I'd keep this issue open to track this Kibana behavior which may still affect the migration (es removing old templates is a manual step).

@simitt
Copy link
Contributor

simitt commented Oct 16, 2024

Let's work on removing the assets if possible to avoid customer confusion.

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

No branches or pull requests

3 participants