Hi,
I’ve got a problem with the new ngalert service. Is there a way to change the title template for pushover messages? I found in the source code that it is using default.title
template, probably from here default_template.gol but I can’t find a way to replace it with something else. Is it possible? Overwrite the default.title
template somehow? On the other hand message body is defined as model.Settings.Get("message").MustString(
{{ template “default.message” .}}),
, so I can easy change it by using the message property and make my own template…
Hi @ktycz666, did you find a way to overwrite the default.title, alias __subject with another go template? If I add a go template like this:
{{ define “default.title” }}[{{ .Status | toUpper }}{{ if eq .Status “firing” }}:{{ .Alerts.Firing | len }}{{ end }}]{{ end }}
Which should result in only
[FIRING:1] or [RESOLVED]
It won’t use my custom template.
Just checking that you’ve both had a chance to look at the docs for this Message templating | Grafana Labs
Just checking that you’ve both had a chance to look at the docs for this Message templating | Grafana Labs
That page does not explain how to overrule the default title, if it is not a separate field in a notification channel.
Slack has a specific ‘title’ field to configure. But Pushover and Telegram have not.
I found in the source code that it is using
default.title
template
As far as I can find in that file, there is no way to overrule this setting. So it is currently not supported in Pushover and Telegram. Would be nice if it could be configured in those services.
Came here to let the next person know to not looking any further: it is not possible currently.