Embed kibana dashboard/visualizations on an external webpage as iFrame

I am doing these below mentioned steps

  1. Create a visualization, apply the filters, then save the visualization
  2. Click "Share" at the top
  3. Copy the iframe code
  4. Paste the iframe code into your external HTML.

when i paste the iframe code in any external site, kibana login page appears and when i enter my username and password the login page just gets reloaded and asks for the username and password again. the same process is repeating and it doesn't take me inside kibana. Is there any proper way to embed our kibana visualization to an external page?? please help me :slightly_smiling_face:

Hey @Gokul6,

Just to exclude a "bad-cookie" scenario, do you see the same issue if you try in a browser private tab (so that no previous cookies are used)?

Best,
Oleg

Thanks @azasypkin for your help !!! It worked after clearing my browser history and cookies, also I used a private tab!!

I try to do the same, but when I open the HTML page with the embedded Iframe, I get the following error.

Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.

That sounds like a completely different problem, I'd suggest you to create a separate Discuss post. But before that search for this error message in the the forum and see if anyone had similar problem in the past.

Well, it happens when I do it on the same way as the OP: Open the HTML page on a Private Browser (Chrome Incognito)

I'll try to work my way around my initial problem first.

@nathansegers did you clear your browsing history completely ??

Ahh, I see.

I tried it on Firefox, which I never use, and it works indeed.
How is it going to perform if this goes into production? Should users delete their browser history all the time?

@nathansegers for now i copied the iFrame code from by kibana dashboard and pasted it in the below site to test.

we are yet to test this in production.

my guess is that, in any browser if you use an iFrame site to run your code and at the same time you are logged into kibana means it will definitely not work.

I have deployed my application to the cloud to test it.

You can try to log in with user discuss and password discuss.
It has no access to do anything else than view the default sample dashboard.

It does indeed work in a private browser with no history...

it would be great if this also works for other users that are logged in their accounts on Kibana...
Our customers would be able to view this dashboard, so that is fine, but it's not ideal.

@nathansegers yes I logged in as you said and it worked fine :blush: thanks for your help !! :blush:

I do hope in the future it will be better, and allow me to view it without having to clear my browser history.
One option would be to go to the Kibana dashboard, login, and then go back to the embedded page ...