Closed Beetix closed 2 years ago
I couldn't find it either. However the MS Teams plugin has a little example of the template format. Should work if you create a file and point the telegram plugin to it.
MS_TEAMS_SUMMARY_FMT = '<b>[{{ alert.status|capitalize }}]</b> [{{ alert.severity|upper }}] Event {{ alert.event }} on <b>{{ alert.resource }}</b><br>{{ alert.text }}'
Also, the telegram plugin is already using a template but it's embedded into the script. See "DEFAULT_TMPL" variable in there.
I couldn't find it either. However the MS Teams plugin has a little example of the template format. Should work if you create a file and point the telegram plugin to it.
MS_TEAMS_SUMMARY_FMT = '<b>[{{ alert.status|capitalize }}]</b> [{{ alert.severity|upper }}] Event {{ alert.event }} on <b>{{ alert.resource }}</b><br>{{ alert.text }}'
Also, the telegram plugin is already using a template but it's embedded into the script. See "DEFAULT_TMPL" variable in there.
Yes, I ended up using the DEFAULT_TMPL
variable 😃 Could be worth embedding it or change the link in the README.md
.
what are the possible filters we can use ?
edit: https://jinja.palletsprojects.com/en/latest/templates/#builtin-filters
Issue Summary In the Telegram plugin's
README.md
an example template is mentioned in Explorer. Once on the site there doesn't seem to be any Jinja2 template.