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

Links in the dashboards from elastic agent integration are not working in a multi space environment #6691

Closed
daverick opened this issue Jun 26, 2023 · 18 comments · Fixed by #7471 or #7476
Assignees
Labels
bug Something isn't working, use only for issues

Comments

@daverick
Copy link
Contributor

Hi,

elastic agent integration (version 1.8.0)
Elastic Stack 8.8.1

The navigation panel in the dashboards is using markdown with links like /app/dashboards#/view/elastic_agent-1a4e7280-6b5e-11ed-98de-67bdecd21824.

If the integration is installed in a specific space, theses links do not works, as these links are resolved to the default space
Others integrations are using links like #/view/elastic_agent-1a4e7280-6b5e-11ed-98de-67bdecd21824 to reference the dashboard in the current space.

@daverick
Copy link
Contributor Author

@P1llus

@matthiasledergerber
Copy link

matthiasledergerber commented Jun 26, 2023

We have the same issue. Running Elastic-Stack 8.8.1. Suspect this issue occurred after 8.8.0.

Related (further down): Integration Issue

Related: Multiple issues - Fleet integrations across multiple spaces confuses Kibana/Fleet

@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@P1llus P1llus added the bug Something isn't working, use only for issues label Jul 4, 2023
@P1llus
Copy link
Member

P1llus commented Jul 4, 2023

For the navigational panel, we will look into modifying the markdown links and see if they work for all the usecases, thanks for letting us know!

@nicpenning
Copy link
Contributor

This is a problem still today - 8.9.0. Even in our Default space, the links do not work in the Overview dashboard.

All of the links appear to have elastic-agent- at the beginning of them and none of the saved objects seem to have them.

image

image

@P1llus
Copy link
Member

P1llus commented Aug 21, 2023

I tested this myself @nicpenning, however it worked just fine. Are you sure it was on the newest version of the elastic_agent package?

A new PR is coming now to fix some links that might not work on non-default spaces, but except that it should be fine.
If the saved objects do not have the elastic_agent prefix, they were not installed by fleet but rather copied over manually from another space perhaps?

@BenB196
Copy link
Contributor

BenB196 commented Aug 21, 2023

Hi @P1llus I see #7471 marks this as closed, but the actual changes listed in that PR don't touch the dashboard links (only appears to clean up some new lines). I think a push to that branch might've been missed.

@nicpenning
Copy link
Contributor

I tested this myself @nicpenning, however it worked just fine. Are you sure it was on the newest version of the elastic_agent package?

A new PR is coming now to fix some links that might not work on non-default spaces, but except that it should be fine. If the saved objects do not have the elastic_agent prefix, they were not installed by fleet but rather copied over manually from another space perhaps?

We didn't copy this dashboard to any space. Out of the box in the default space this is broken. What version of the integration is this fixed?

@P1llus
Copy link
Member

P1llus commented Aug 21, 2023

@BenB196 Yeah sorry about that, certain resources was not included in that PR, as there are certain issues between 8.9 and 8.10 dashboards.

Will update this again soon when I have an update.

@P1llus P1llus reopened this Aug 21, 2023
@P1llus
Copy link
Member

P1llus commented Aug 21, 2023

I tested this myself @nicpenning, however it worked just fine. Are you sure it was on the newest version of the elastic_agent package?
A new PR is coming now to fix some links that might not work on non-default spaces, but except that it should be fine. If the saved objects do not have the elastic_agent prefix, they were not installed by fleet but rather copied over manually from another space perhaps?

We didn't copy this dashboard to any space. Out of the box in the default space this is broken. What version of the integration is this fixed?

There should not be any way for fleet to create assets that is not prefixed with their related integration, so when you mentioned that they are missing the prefix then that would be the only conclusion I could draw, did you check that the elastic agent integration is up2date on the integration page?

@P1llus
Copy link
Member

P1llus commented Aug 21, 2023

Added the updated hyperlinks now @BenB196 , that should be all to allow the links to work if the integration had been installed outside of the default space.

@nicpenning
Copy link
Contributor

Looks like we were at 1.10.1, upgraded to 1.11.2 and the problem persists.

Also, this is another example of where the Assets tab is blank:
image

@nicpenning
Copy link
Contributor

All of the dashboards work, it appears that the navigation is what isn't working.

But this may be a separate issue to what is posted here.

Overview URL : /app/dashboards#/view/ee9d27e9-cd2a-413b-af37-5712b8c2ea4
Overview Shortcut Link : /app/dashboards#/dashboard/elastic_agent-a148dc70-6b3c-11ed-98de-67bdecd21824

@P1llus
Copy link
Member

P1llus commented Aug 22, 2023

I think that is something specific to your deployment then, might need to look into if something has happened with other spaces @nicpenning .
Tried again just now with 8.9.0:
image
image

The URL's and the assets are working fine, and the shortcut links are:
https://localhost:5601/app/dashboards#/dashboard/elastic_agent-a148dc70-6b3c-11ed-98de-67bdecd21824

Seeing that your actual URL's are without prefix, I still feel those have been manually copied over, which means that the dashboards you are testing is not actually affected by the upgrades, as they are not managed by the fleet instance (since it has been copied or something similar at some point). Else it must be a bug.
If you are unable to resolve it then I would recommend opening a ticket/issue for it, as the intention of this issue (to fix the links for spaces) has been resolved.

@nicpenning
Copy link
Contributor

Interesting!

Here you can see that the dashboards were modified yesterday when I upgraded:
image

When I click on the Overview from this saved object page I get taken to the Overview page which works.

However, the links are still broken there. Here is the raw content in the visualization:

**Navigation**

**Agent Health**  

**[Overview](#/dashboard/elastic_agent-a148dc70-6b3c-11ed-98de-67bdecd21824)**  
[Agent Info](#/dashboard/elastic_agent-0600ffa0-6b5e-11ed-98de-67bdecd21824)  
[Agent Metrics](#/dashboard/elastic_agent-f47f18cc-9c7d-4278-b2ea-a6dee816d395)  
[Integrations](#/dashboard/elastic_agent-1a4e7280-6b5e-11ed-98de-67bdecd21824)  
[Input Metrics](#/dashboard/elastic_agent-a8192f90-cd3f-11ed-869d-e7dc1b551cd2)  

**Overview**

This dashboard gives an overview of the current overall state and health of all Agents and their related enabled Integrations.

I tried reinstalling the Elastic Agent integration but that did not make a difference.

I then tried removing the Elastic Agent integration, however the saved objects persisted. But when I proceeded to install the integration, it shows that all 10 dashboard objects were updated (6 seconds ago). I wonder if there is an error trying to import those.

The next step is that I manually remove the saved objects because the Uninstall feature of the integration did not remove the saved objects.

After installing the integration the 10 Dashboards were imported, and they still do not work. The URL for the main dashboard changed from:
/app/dashboards#/view/9ea2d5db-818b-4897-90d4-b8cc39e62f53?_g=h@2294574
to
/app/dashboards#/view/8c37ed58-e37f-4958-b937-87b8a7306f17?_g=h@2294574

Perhaps the Elastic Agent Integration is not the way to rebuild this?

@nicpenning
Copy link
Contributor

So it seems that the install for the Integration is not giving it the correct static ID but making a new one every time.

{
  "id": "8c37ed58-e37f-4958-b937-87b8a7306f17",
  "type": "dashboard",
  "namespaces": [
    "default"
  ],
  "originId": "elastic_agent-a148dc70-6b3c-11ed-98de-67bdecd21824",

@matthiasledergerber
Copy link

Elastic-Stack 8.10.0 with multiple Kibana Spaces. The Dashboards do work. but when i klick on the link inside a predefied Dashboard i get 404. It seems as the integrated links in the predefined dashboards are broken. For me its the Network Packet Capture Integration. Already tried to reinstall the integration. it works but the dashboard links lead to 404

Here I am inside the DNS Part and i want to jump to DHCP -> 404
image

@nicpenning
Copy link
Contributor

nicpenning commented Sep 15, 2023

I am with Matthias here on this one.

I upgraded to the latest version of the Elastic Agent integration (1.13.0) and yes all the dashboards exist and work when navigating directly to them.

However, all of the table of contents links take you to the 404 page. I have even removed the dashboards entirely and then reinstalled the integration.

This is in the latest Table of contents:

**Navigation**

**Agent Health**  

**[Overview](#/dashboard/elastic_agent-a148dc70-6b3c-11ed-98de-67bdecd21824)**  
[Agent Info](#/dashboard/elastic_agent-0600ffa0-6b5e-11ed-98de-67bdecd21824)  
[Agent Metrics](#/dashboard/elastic_agent-f47f18cc-9c7d-4278-b2ea-a6dee816d395)  
[Integrations](#/dashboard/elastic_agent-1a4e7280-6b5e-11ed-98de-67bdecd21824)  
[Input Metrics](#/dashboard/elastic_agent-a8192f90-cd3f-11ed-869d-e7dc1b551cd2)  

**Overview**

This dashboard gives an overview of the current overall state and health of all Agents and their related enabled Integrations.

Which is probably correct, but my previous statement is some odd behavior where the new dashboards are not getting static IDs but rather dynamic ones which tells me there must be some dashboards with those IDs that exist somewhere else and instead of writing over them they are getting created with new IDs.

For example:
image

If I find the time, I will look to see if other spaces have these Dashboard IDs (not just names) that are outdated and need to be removed.

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