Dashboard (using iFrame) not opening in web broweser window

Hi,
I am sharing the Grafana dashboard using the following link in a webpage

The way I had done is I had copy pasted the above link into an HTML file dashboard.html and tried to open the file dashboard.html through browser. http://platform.mylabs123.com/dashboard.html

When I open this in browser - The browser shows me the following error
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This content can’t be shown in a frame

There is supposed to be some content here, but the publisher doesn’t allow it to be displayed in a frame. This is to help protect the security of any information you might enter into this site.

Try this

  • [Open this in a new window]

-=-=-=-=-=-----------------------------

I had tried changing permission in my webserver(apache2) but I am not able to resolve. If any of you has faced this issue can you give me some tips ?

Regards
Girish

In Grafana 6.2 , there are two options in defaults.ini which restrict iframes

allow_embedding: false
cookie_samesite: lax

Change above two settings as below to make iframes work

allow_embedding: true
cookie_samesite: none

Thanks Rahuls.

But this changes did not help me. Yes, I am using grafana 6.2.2. I ma attaching the iam attaching the image for your reference
I keep seeing the message content can’t shown in frame. What the browser says is:

"There is supposed to be some content here, but the publisher doesn’t allow it to be displayed in a frame. This is to help protect the security of any information you might enter into this site.

Try this

**** Open this in a new window***

Did you remember to restart grafana after changing the config file?

Yes, I did restart the grafana every time I made changes to the config files
Still it is not working. Have you tried this iframe and did it work for you
Regards
Girish

No, I have not tried it, I was just suggesting something that might be the problem.

I have this working. Can you show your config.

Hi Rahuls.

Thanks for the support

Here is the path to defaults.ini (I had uploaded to GitHub as I am not able to copy paste here)


Regards
Girish

Hi Girish,

You seem to have changed the value but missed to uncomment them, remove “;” at the begining of line

set cookie SameSite attribute. defaults to lax. can be set to “lax”, “strict” and “none”

cookie_samesite = none

set to true if you want to allow browsers to render Grafana in a. default is false.

allow_embedding = true

1 Like

Thank you very much Rahul, The issue is resolved when I removed the semi colon.

I thought # is for commenting did not know ; is also for commenting. So I guess both ; and # can be used for commeting

Hello, i have the same problem. I followed the instruction a those pages:

I modified the file sample.ini in grafana folder (I am using win 10 pro), but I cannot visualize the frame
web

Can you help me in solving this problem?

I am using grafana cloud pro.

Thank

Filippo

Hi Guys, I am experiencing exactly the same problem. The iFrame address is like:

I cannot open this iFrame.

I have done the configuration like this:
cookie_samesite = none
allow_embedding = true

I am using Grafana Cloud Trial version. We need to the complete this evaluation before we can get into a contract.

Thanks for any help.

If anyone else stumbles on this and needs the solution -

Edit disable_sanitize_html to true in the default.ini file. This is located in /usr/share/grafana/conf/ for those trying to locate it in the prebuilt Docker container.

Save the file

Restart Grafana or the Docker container

Make sure to fully refresh the page (Ctrl+F5) you are trying to have an embedded iframe located in