Not yet. There’s still a problem. It appears that puppeteer installs a chrome
binary that is incompatible with the Raspberry Pi hardware…
Replace the binary had worked for me, to get chromium started
just wondering is anyone solved quire slow generate time of chart from grafana with some kind of cache or whatever.
I’m not sure if it is cause by slow server (2,4ghz, 16gb ram) or docker itself, but 7days water temperature chart is generating like 5seconds or so, and therefore quite unsuable on OH frontend as embeded image.
Is there a way how to pre-generate those graphs so OH will just pick static png from somewhere instead of waiting for fresh generated one?
edit: nevermind I’m not alone
I’ve not noticed rendering being particularly slow but I actually wrote a rule to do exactly what you asked for, pre-generate the static images from a rule and have the sitemap just load the image from there anyway, mostly because I didn’t want to have to generate the chart every few seconds if I’m looking at the last month’s worth of data.
Near the end of the original post there is a link to Grafana Image Charts where I posted the rule and how it works. There is Rules DSL, Rules DSL with Expire, and a Jython version posted.
very cool indeed, thanks for sharing… pitty that grafana team is unable to introduce caching on their end …
I decided to move grafana from my OpenHAB host (OpenHABian 2.5.10-1 Release Build) since it seemed too complicated to get rendering to work on a RPi. I did a grafana and a grafana rendering plugin install on a separate ubuntu 20.04 w. docker-compose with the following:
# Grafana
grafana:
image: grafana/grafana:latest
container_name: grafana
restart: always
ports:
- 3000:3000
volumes:
- /home/christian/docker/grafana:/var/lib/grafana
environment:
- GF_PATHS_CONFIG=/var/lib/grafana/conf/grafana.ini
- GF_RENDERING_SERVER_URL=http://renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000
- GF_LOG_FILTERS=rendering:debug
- GF_AUTH_ANONYMOUS_ENABLED=true
# Grafana Renderer
renderer:
image: grafana/grafana-image-renderer:latest
ports:
- 8081
Grafana works just fine and the renderer seems to be working as it should. I can browse the following url (without grafana authentication:
http://192.168.1.57:3000/d-solo/_18XpB1Mk/utetemp?orgId=1&from=now-20d&to=now&panelId=4&width=500&height=100&frameborder=0
The problem is that the same url doesn’t work in HABpanel:
<img width="250" height="100" src="http://192.168.1.57:3000/d-solo/_18XpB1Mk/utetemp?orgId=1&from=now-24h&to=now&panelId=4&width=500&height=100&frameborder=0" />
It only presents an “empty” image box. If I RMB “Open picture in new tab”, the graph shows up as it should. Any ideas?
Not sure why but when I started all over again and generated the url, I got an extra “render” after the host:port and for some unknown reason. This url works just fine. Happy days
http://192.168.1.57:3000/render/d-solo/_18XpB1Mk/utetemp?orgId=1&from=now-20d&to=now&panelId=4&width=500&height=100&frameborder=0
Hi, I am using kubernetes and installed grafana there with grafana image renderer remote plugin. when i do “direct link rendered image” it displays a small square image…
This is yaml file of grafana deployment with multi-container… i am getting this error:
lvl=eror msg=“Failed to send request to remote rendering service.” logger=rendering renderer=http error=“context deadline exceeded”
could you pls help. thanks
it works all of a sudden, not sure what was the issue.
To make grafana work in an iframe you have to edit the grafana.ini.
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
allow_embedding = true
Greg, thanks for the reply. I am not embedding but trying to get the render image thru api code to programmatically do “direct render image”, i am getting the following error intermittently:
lvl=eror msg=“Failed to send request to remote rendering service.” logger=rendering renderer=http error=“context deadline exceeded”