I am trying to get some panels to embed in a htm page hosted on another server. I am using the docker version 2.12 and have already changed the setting to allow embed (allow_embedding: true).
The panel just shows up as “192.168.2.110 refused to connect”. It is first seeing this error that lead me to the settings change to allow embedding in Grafana.
The webserver that hosts the test.htm page is Apache and SSL, and PMM is running with SSL. From CLI on a random server I can use “curl -k …” and the panel will load the page (though obviously unviewable). The site that hosts the HTML pages is HTTPS only, so the embed links thus have to be as well.
BTW, I have been editing /etc/grafana/grafana.ini and within PMM>Admin>Settings it is listed as allowing embed. Which would make me think I am editing the correct ini file. However within Chrome’s dev tools I see this:
Refused to display … in a frame because it set ‘X-Frame-Options’ to ‘deny’
Which leads me to think that something else is still blocking or not allowing the panels to be embedded. Also I just want to mention the host server contains a collection of web pages that are embedding to other HTTPS servers.
I found the problem, it had nothing to do with Grafana, but within NGINX. In the config file pmm-ssl.conf it had the line “add_header X-Frame-Options DENY;”. I was looking at the wrong source.
For anyone else looking to embed panel within HTTPS site, here is your answer. Besides settings within Grafana.ini you need to set in /etc/nginx/conf.d/pmm-ssl.conf the X-Frame settings