iframe displays "refused to connect" for Grafana

Viewed 3244

I am using grafana version 6.5.3 and I am trying to make a grafana dashboard be displayed in an iframe on a webpage in my blazor server app. The iframe is rendered but displays the following message "xxx.xxx.com refused to connect".

<iframe src="http://xxx.xxx.com/mygrafanacharts"
     frameborder="0">
</iframe>

The Grafana server is configured with

allow_embedding = true

I have no clue if the Grafana server is not configured correctly or if there is some configuration that needs to be changed on my website.

1 Answers

I encountered the same problem and was sure, I changed the allow_embedding = true setting, but when I wanted to confirm this and looked under http://[yourGrafanaServer]/admin/settings I saw, that it was still false.

When I opened the grafana.ini, I realized, that I had forgotten to remove the ; at the start of the line to uncomment the setting. After doing that, the iframe worked fine! Maybe this was the issue here too.

Related