Closed matthijsvisser closed 4 years ago
It should be possible to get it all working with Docker because I use a similar setup.
Since both openHAB and Grafana seem to work correctly on the same port, maybe the library doesn't generate the correct Webview URLs? You can check the generated URLs by enabling the debug mode by appending &debug=true
to your browser URL. Firefox might also show the blocked URL requests in the debug view Network panel.
Hi,
Thanks for the quick reply. I managed to get rid of the errors, but an other one showed up:
Load denied by X-Frame-Options: http://20.0.0.210:5001/grafana/d-solo/FydmKUdZz/home?from=now-1y&to=now-1d&panelId=33&theme=light does not permit framing.
This suggests that the Docker environment variable 'GF_ALLOW_EMBEDDING=true' for Grafana is not set? But I did, as shown above.
I've cloned your repository again and started with a minimal configuration. Only the static panel is shown on the sitemap and debug mode is on. The URL is correctly generated and works when accessing it in another tab:
http://20.0.0.210:5001/grafana/dashboard-solo/db/home?from=now-1y&to=now-1d&panelId=33&theme=light
The URL in the error message also works outside openhab.
http://20.0.0.210:5001/grafana/d-solo/FydmKUdZz/home?from=now-1y&to=now-1d&panelId=33&theme=light
Any ideas?
Looks like the section name is missing from your allow embedding variable, see: https://grafana.com/docs/installation/configuration/#using-environment-variables
So maybe it works when you use GF_SECURITY_ALLOW_EMBEDDING
instead?
I see it's also being used like that in the community.
I'm still using an older Grafana version myself. But it's good to know I need to add this environment variable while upgrading.
I can't believe that I've missed that..! Got everything working now, really appreciate the help!
That's great news! :-)
Hi,
I'm really struggling to get the Grafana webview panels to work with Openhab and Grafana behind a reverse proxy in Docker.
I get the following errors (in the Firefox console):
Docker-compose file:
nginx.conf:
sitemap:
Openhab can be accessed at: http://20.0.0.210:5001 Grafana at: http://20.0.0.210:5001/grafana
Your help is much appreciated, thank you!