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

[Fleet] Make logs-* and metrics-* data views available across all spaces #172991

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

kpollich
Copy link
Member

@kpollich kpollich commented Dec 8, 2023

Summary

Closes #172009

Adds a call to updateObjectsSpaces with ['*'] as the spaces list after Fleet's managed data views are created.

Existing data views will be updated to be global whenever installKibanaAssets is called.

Checklist

@kpollich kpollich added release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team labels Dec 8, 2023
@kpollich kpollich self-assigned this Dec 8, 2023
@kpollich kpollich requested a review from a team as a code owner December 8, 2023 19:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Detection Engine - Security Solution Cypress Tests #6 / Alert user assignment - ESS & Serverless Updating assignees (single alert) adding new assignees via More actions in alerts table adding new assignees via More actions in alerts table
  • [job] [logs] x-pack/test_serverless/functional/test_suites/observability/config.ts / serverless observability UI Observability Log Explorer Header menu Discover tabs should navigate between discover tabs without keeping the current columns/filters/query/time/data view

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @kpollich


results.push(result);
} catch (error) {
logger.error(`Error making managed index patterns global: ${error.message}`);
Copy link
Member Author

Choose a reason for hiding this comment

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

Since this operation gets retried on every setup, there is a possibility this error will appear many times in logs if there is something going wrong with the spaces update operation. Maybe worth moving this to debug?

Copy link
Member

Choose a reason for hiding this comment

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

@kpollich what will could make that update fail? any thing that will not be a transient error?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think if someone manually creates one of these data views with the same title property before installing any integrations there could be a conflict and that would surface as an error here. Very much an edge case and technically preexisting before this PR.

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM

@mbudge
Copy link

mbudge commented Jan 14, 2024

What happens if a data view created by the user called logs or metrics already exists in the space? Don’t want our dashboards to break again.

@kpollich
Copy link
Member Author

Data views have a globally unique ID that must be unique across all spaces, so there should be no risk of conflict when Fleet marks one as global here. Even if there are multiple logs-* and metrics-* patterns in many spaces, Fleet will also only update data views that exist in the current space where an integration is being installed as well.

Overall, this change should allow users to remove their own logs-* and metrics-* data views in favor of the ones managed by Fleet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Make Fleet's managed data views global across spaces
7 participants