Convert grafana panels to images for control page.

Posted on
Wed Sep 12, 2018 11:06 am
eriass offline
Posts: 20
Joined: May 12, 2016

Convert grafana panels to images for control page.

Hi,
Probably someone has already made this but I couldn’t find it anywhere. With help from a awesome friend I have made a script that saves a grafana-panel to a jpg image. And with help of that jpg image I can display it on my control page.

First of all I install the Grafana/Influx plugin and make all settings for that plugin, make panels etc.
After that I add a API Key to get a authorization key.

Copy link, all text AFTER Authorization:

Then I go back to the grafana dashboard to choose which panel I want to view.
In top of the panel I press the little arrow and choose ”Share”
In the dialog box that opens I press the ”Direct link rendered image” button in the bottom left.

Copy that link as well. delete the from & to in the link or else you will have a static image.

then make a Action Group that executes a apple script:

do shell script "curl -o \”/Library/Application Support/Perceptive Automation/Indigo 7/IndigoWebServer/images/image.jpg>” -H \"Authorization: <INSERT LINK FROM API>\” \"http://<INSERT GRAFANA LINK TO DIRECT LINK RENDERED IMAGE>\””


Of course you can change the path to the web server if you want to do another folder.

Make a schedule that automatically executes the action

After this you can add a refreshing URL in your control page, in my case:

http://user:password@127.0.0.1:8176/images/image.jpg

Hope you like it!

//Eric

Posted on
Wed Sep 12, 2018 4:41 pm
vtmikel offline
Posts: 339
Joined: Aug 31, 2012
Location: Boston, MA

Re: Convert grafana panels to images for control page.

This is great. I’ll check it out!


Sent from my iPhone using Tapatalk Pro

Posted on
Fri Sep 14, 2018 5:31 pm
mundmc offline
Posts: 298
Joined: Sep 14, 2012

Re: Convert grafana panels to images for control page.

Wait, I’ve been toying with the idea of Grafana, but I didn’t know the standalone plugin didn’t work with Control Pages. I am confused.


Sent from my iPhone using Tapatalk

Posted on
Sun Sep 16, 2018 12:41 pm
vtmikel offline
Posts: 339
Joined: Aug 31, 2012
Location: Boston, MA

Re: Convert grafana panels to images for control page.

Grafana provides a web server that is used to view your dashboard. It's mostly client-based, using JavaScript. There's no way to directly embed the web content from Grafana into Indigo's control pages. There have been a couple of available ways to render individual panels to images, then make those images available in a control page. @eriass has provided a set of instructions in this thread.

Posted on
Mon Sep 17, 2018 11:12 am
mundmc offline
Posts: 298
Joined: Sep 14, 2012

Re: Convert grafana panels to images for control page.

vtmikel wrote:
Grafana provides a web server that is used to view your dashboard. It's mostly client-based, using JavaScript. There's no way to directly embed the web content from Grafana into Indigo's control pages. There have been a couple of available ways to render individual panels to images, then make those images available in a control page. @eriass has provided a set of instructions in this thread.

Thank you for clarifying! They’re so pretty


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests