EIDiamond / grafana_image_downloader

Download Grafana panel as image, add watermark and send to telegram chat or channel.
Apache License 2.0
1 stars 1 forks source link
grafana grafana-image-renderer telegram watermark

Description

Download Grafana panel image by using Grafana Image Renderer plugin and send it to Telegram chat or channel.

Features

Dependencies

Grafana requirements

Grafana Image Renderer must be installed before using the tool. Please read Plugin installation instruction carefully, especially if you are going to use Grafana Docker image.

Grafana Docker image

Please use the following instruction to run Grafana Docker image with the plugin installed. The instruction is working pretty well with Grafana 9.3.2 and latest Dockerfile

Grafana API Key

Please generate API Key for the tool.

Navigate: Configuration -> API Keys menu

HOW TO: Grafana installation

Here

Tested environment

Configuration

Configuration can be specified via settings.ini file.

Section GRAFANA

Specify Grafana host, port and api key

Section PANEL_IMAGE

Specify settings and panel to render:

Command line arguments

Watermark

Watermark is optional and can be disabled if TEXT (watermark text) is empty.

Watermark is drawing in the bottom right corner.

Telegram

Telegram is optional and can be disabled if BOT_TOKEN and\or CHAT_ID are empty.

Telegram bot can be easily created in a few seconds via @BotFather.
Please note the easiest way to find chat_id.

Logging

All logs are written in logs/downloader.log. Any kind of settings can be changed in main.py code

Project change log

Here

Disclaimer

The author is not responsible for any errors or omissions obtained from the use of this tool.