Grafana send alert image to telegram separately

Grafana send alert image to telegram separately, not in one message.
How to make the image be inside the body of alert message.
Grafana version 9

@jayrady4 welcome to the :grafana: community!

If your alerts are grouped (you can find out in the notification policy) then they will arrive together in a message with other alerts.

To enable alert images follow these steps:

Hi

Did you solve this?

Thanks

Unfortunately, it is not possible at this moment. Telegram integration uses two Telegram API endpoints: sendMessage and sendPhoto. The former does not support binary attachments but the latter does not present long messages well.

However, I can see a possible solution for this problem: screenshot service supports uploading images to a remote location. So, it can provide the URL of the uploaded image to the Telegram integration so it can embed it to sendMessage command and then, if that URL is publicly accessible, I guess Telegram will generate a preview.

I created an issue Include screenshot URL to Telegram message · Issue #123 · grafana/alerting · GitHub to track the progress on it. If you think this could be useful, please vote in the issue by :+1:

1 Like