Closed Dorlas closed 1 year ago
The project is using Grafana image renderer plugin to render images. At this moment the answer is no.
Based on the documentation.
Note: Image rendering of dashboards is not supported at this time.
I guess it's is possible to write script to make screenshot a whole dashboard, but I haven't research it.
I testing another project: https://github.com/wkhtmltopdf/wkhtmltopdf
On trivial sites work very well (make PNG or PDF with content).
BUT - on Grafana snapshot URL-s (without authentication) - i grab only BLACK square (((
Great, thank you for sharing.
Another idea is:
It's just an idea. I guess the hardest part is combine images in the same way how they are represent on dashboard. But may works for simple cases. Just example of dashboard:
BTW, I like idea with screenshot. It will work in all cases.
Hello again!
I write worked code, with webbrowser, pygetwindow and ImageGrab Python Modules.
First module open Firefox on target URL: firefox = webbrowser.Mozilla("C:\Program Files\Mozilla Firefox\firefox.exe") firefox.open("http://x.x.x.x:3000/d/cyos1EX7k3/pokazateli-vnutribol-nichnyh-konsul-tacij?orgId=1&kiosk=tv")
pygetwindow locate Browser coordinates. ImageGrab grab screenshot and save it to single file.
Next i'am collect all Grafana dashboards, what i needs.
With PIL (pillow) and PyPDF2 modules i'am convert all PNG to multple PDF files. Next all PDF files combine to single PDF.
And Finally i'am send PDF to email.
Tell me, please, is it possible to download the entire image from the Grafana at once with a dashboard that contains many panels?