elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.73k stars 8.14k forks source link

[Logs UI] Improve error handling when using undefined remote cluster in source settings #125496

Open miltonhultgren opened 2 years ago

miltonhultgren commented 2 years ago

📓 Summary

~🚫 Blocked until #159128 is implemented.~

The current implementation for the Logs UI setting page doesn't work well when a user configures an invalid index pattern, not handling properly a failing response (HTTP status 500) from the server:

[2022-02-14T12:33:41.213+00:00][ERROR][http] ResponseError: [object Object]: security_exception: [no_such_remote_cluster_exception] Reason: no such remote cluster: [remote_cluster]

👣 Reproduction steps

  1. Enter the Logs UI Settings page.
  2. Fill in an index name pattern that includes a remote cluster that is not configured, like unknown_remote:metricbeat-*
  3. Save the settings and reload the page

✔️ Acceptance criteria

  1. No Logs UI page should fail to load due to a misconfigured index source
  2. When saving the settings, warnings should be shown if there is an unknown remote cluster being used
  3. The error in Logs UI should not include the raw error, instead we should display a user-friendly message about what is wrong in the config
elasticmachine commented 2 years ago

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

pmeresanu85 commented 2 years ago

@smith I created a new Milestone label to tag all ERs which would be candidates for archiving. Archiving doesn't mean the idea is rejected, it just means we shouldn't actively pursue this idea.

tonyghiani commented 1 year ago

Related to https://github.com/elastic/kibana/issues/144882

tonyghiani commented 1 year ago

To gracefully handle this issue where a name pattern is not available or unreachable, we can apply the same behaviour implemented for the Metrics setting for the same scenario, solved with this PR.

elasticmachine commented 10 months ago

Pinging @elastic/obs-ux-logs-team (Team:obs-ux-logs)

achyutjhunjhunwala commented 10 months ago

Anyone picking this issue, the only pending issue here is with the Logs Setting page

tonyghiani commented 10 months ago

I've reworded the issue to be correctly scoped for the Logs UI settings. The suggested approach to implement a solution is still valid.

gbamparop commented 4 months ago

Related to https://github.com/elastic/kibana/issues/180936