Grafana Image Renderer

yep - I updated the openhabian-config, but still the same…

When I did the same long time ago. I noticed I had to uninstall the old Grafana, and then install the new one manually. It might be worth a try.
Remember to make a backup of your charts if any, (easily done with export json files, which afterwards can be imported to the new version).
Please notice - Today I´m running Grafana on a windows server, cause I simply gave up getting Grafana to render a chart on a Rpi3B+ Grafana consume too much resources when rendering with phantomjs, so it will breake Java and then kill openhab.

I am constantly updating Grafana with a regular reinstall. The old version does not need to be deleted. all charts remain in place. At the same time, no one canceled the backup.
The download page https://grafana.com/grafana/download has all the recommendations. They change with the release of a new stable version. It is necessary to execute only two teams.

Thanks all of you. I manually updated and am now running newest version.
Using this tutorial I now have the Grafana image renderer plugin working on my Rpi3B+ :slight_smile:

I’m glad you got it working and thanks for the confirmation that it works on an RPi.

HI Rich,

  1. after this command i get the messege
Error: ✗ Plugin is not supported on your architecture and os.

i am on 2.5M4 on Pi4 and Grafana v6.4.4

  1. Tried manual installation, but on this page https://grafana.com/grafana/plugins/grafana-image-renderer/installation the link with zip is unavailable Screenshot by Lightshot
    1.0.0 https://grafana.com/api/plugins/grafana-image-renderer/versions/1.0.0/download
    1.0.5 https://grafana.com/api/plugins/grafana-image-renderer/versions/1.0.5/download

It means i have no ability to render grafana images? :sleepy:

PS
Manual install from this thread also gives error

I don’t run it on an RPi so I can’t be of much help. But @sapster77 posted a link to a tutorial that might help.

1 Like

Thanks but as said above - Manual install from this thread also gives error

So it seems to be no way to render grafana on pi4 and the most bad thing is that according all that no way to get grafana on the myopenhab cloud and outside the local network.
It a pity.

Via the link I posted above I made it run nicely on a Pi3 (local network). I can see that the thread has now been updated to also include instructions for a Pi4, so you could try that.
Let us know if it works:-)

What did you do to make it work on a RPi3B+? So far all my attempts, following those instructions, failed. Compilation always ended prematurely.

EDIT: here are the instructions for compiling the new Grafana renderer plugin on RPi3B+:

Super - so you made it work:-) Thanks for sharing the updated solution.

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 :grinning:

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.