Commit d33c4e5e by Tomo Wang Committed by GitHub

Alarting: fix alarm messages in dingding (Fixes #29470) (#29482)

parent 863dbc7b
......@@ -119,14 +119,14 @@ func (dd *DingDingNotifier) genBody(evalContext *alerting.EvalContext, messageUR
}
for i, match := range evalContext.EvalMatches {
message += fmt.Sprintf("\\n%2d. %s: %s", i+1, match.Metric, match.Value)
message += fmt.Sprintf("\n%2d. %s: %s", i+1, match.Metric, match.Value)
}
var bodyMsg map[string]interface{}
if dd.MsgType == "actionCard" {
// Embed the pic into the markdown directly because actionCard doesn't have a picUrl field
if dd.NeedsImage() && picURL != "" {
message = "![](" + picURL + ")\\n\\n" + message
message = "![](" + picURL + ")\n\n" + message
}
bodyMsg = map[string]interface{}{
......
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