Open consulthys opened 3 months ago
Pinging @elastic/fleet (Team:Fleet)
This is still happening in 8.16.0, though it is now not showing the 404 page anymore, but a different one, which isn't more helpful to users.
You can see in the URL that the user was redirected to the elasticsearch-metrics-ingest-pipelines
dashboard, which doesn't exist, so it's not clear on what to do next.
@kpollich @criamico Is there any chance to get this fixed? Thanks 🙏
I do still see a 404 on a brand new 8.16.0
install.
Edit: for posterity, workaround would be to manually install the Elasticsearch integration's assets which will provide the elasticsearch-metrics-ingest-pipelines
saved object.
POST kbn:/api/fleet/epm/packages/elasticsearch
I'll bump the priority on this and schedule it for a sprint of ours in December, but we're a little low on bandwidth to get to this quickly right now. If there's interest in getting our team to provide guidance + review on a PR from the stack monitoring team or elsewhere that would likely result in this landing more quickly.
We (Stack Monitoring) would love to help, but our Fleet knowledge is pretty thin 😇
I'll try to provide some helpful hints about how we could implement a fix for this below. Let me know if you think this is enough to get started on contributing here. We'd really appreciate the help with this one 🙏
The getBulkAssets
API handler lives here:
This is essentially a thin wrapper for this "service" method in Fleet's data layer:
It looks like there's an explicit swallowing of errors from the getInAppUrl
method here that might be overly broad, causing us to ignore 404 errors when resolving assets, e.g.
This is probably the first thing I see here that seems like it could be a culprit, and it looks like we also have some potentially naive logic for generating an app link that doesn't actually check if the link is valid (because the above error is squashed), e.g.
I think the fix for this would be to narrow the scope of this error squashing logic so we're not ignoring legitimate 404's for nonsensical assets, only space access errors.
Kibana version: 8.15.0
Elasticsearch version: 8.15.0
Server OS version: ESS
Browser version: Version 126.0.6478.185 (official build) (x86_64)
Browser OS version: MacOS 11.2.3
Original install method (e.g. download page, yum, from source, etc.): ESS
Describe the bug: The "Ingest pipelines" link available in Stack Monitoring stopped working as designed in 8.15.0.
If the
elasticsearch
integration assets have not been previously installed, clicking on that link redirects the user to a 404 page (Screenshot 1) instead of showing a popup inviting the user to install the assets (Screenshot 2)Up to 8.14.3,
getBulkAssets
would not return an asset if it didn't exist as a saved object. Since 8.15.0, it now simply echoes back links for whatever asset is sent to it, whether fictitious or not . Since the response from that call is used as a condition to show the popup (screenshot 2) and the call always returns a non-empty response, regardless of the existence of the underlying asset, the popup is never shown.Steps to reproduce:
Expected behavior: The expected behavior is to see a popup (screenshot 2) inviting the user to install the
elasticsearch
integration assets if those haven't been installed prior.Screenshots (if relevant):
Screenshot 1: Dashboard 404
Screenshot 2: Popup inviting the user to install integration assets
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
On any version below 8.15.0, the following request returns an empty response:
As of 8.15.0, the same request returns whatever is passed:
Additional context:
Possibly related to https://github.com/elastic/kibana/pull/182180 as it seems to be the only one between 8.9.0 and 8.15.0 that modified the
getBulkAssets
function in a meaningful way.