Commit 4f5dc610 by Carl Bergquist Committed by GitHub

Merge pull request #7417 from Erliz/patch-1

Add image url to telegram alert notifier
parents 0c46def1 0e892e9f
......@@ -93,6 +93,9 @@ func (this *TelegramNotifier) Notify(evalContext *alerting.EvalContext) error {
if err == nil {
message = message + fmt.Sprintf("URL: %s\n", ruleUrl)
}
if evalContext.ImagePublicUrl != "" {
message = message + fmt.Sprintf("Image: %s\n", evalContext.ImagePublicUrl)
}
bodyJSON.Set("text", message)
url := fmt.Sprintf(telegeramApiUrl, this.BotToken, "sendMessage")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment