Displaying Images from Python scripts

Hi there, I’m looking for some help to achieve a project. I hope my issue will be easy enough to understand and please forgive my english issues.

  • What Grafana version and what operating system are you using?

    I’m using Grafana v8.5.2

  • What are you trying to achieve?

I’m working on a project and I just want to be able to display images coming from a Python script.
Currently my Python script is starting a camera and fetching some frames from it.
Then i’m encoding these frames into Base64 and trying to send them to the Grafana Live measurement ( /api/push/live/custom_stream_id with Telegraf )
I succeed in sending values like maths functions, but I couldnt send any strings with this method.
My idea was trying to make a dashboard with images displaying like Ed Welch did in his Nissan Leaf work : Nissan Leaf -> Cloud all the things - GrafanaCONline | Grafana Labs

In this work he talked about Grafana LOKI to store Base64 images, but i didnt find any documentation about that ( probably because i’m very new in this ).

  • How are you trying to achieve it?

I tried with this piece of code:

Please note that i tried with this code ( maths one ) as well and it worked very fine :

With this one, I was able to create a live dashboard as it is mentionned in Grafana Stream Metrics documentation. ( Without websockets )

  • What happened?

With the First piece of code i’m getting an Internal Server Error ( 500 ) and Logs from grafana said : Error parsing metrics.
I’m sure that it come from the “metrics format” but didnt manage to find how to solve it.

  • What did you expect to happen?

I wanted to have the base64 encoded images in a Grafana table to display it.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

Error Parsing metrics in Systemctl status grafana-server

  • Did you follow any online instructions? If so, what is the URL?

I took some ideas from this topic : How to connect streaming data source to websocket?

I would be glad to have any ideas or documentations to read about Loki storing Images.
Thanks for Helping if you can do it !

I managed to do what I wanted to do using Grafana Loki and logs.

Was not quite hard after I understood how Loki ( and promtail ) was working.