How to proper template messages on Grafana 8.3 New Alert Manager

For the “email” notification there’s basically no way to assign any defined template. The only possible option is to re-define the “html” template (which is an html file in grafana distribution).

1 Like

I went through the discussion and still couldn’t find a definite answer. I am using MS Teams as the contact point in my local setup and want to send custom notifications. Can someone suggest me how can I do that because creating a message template isn’t helping me , I am not sure how to bind them.

Really? Grafana supposedly HAS someone who is in charge of documentation: Fiona Peers Artiaga

Senior Manager, Technical Writing and Documentation

So you’re saying you need the community to tell her how to do her job? Is she the ONLY person you have writing documentation, or does she have a team of writers? “Senior”, hmm, implies she wouldn’t need us to tell her how to write good documentation for AM. “Manager” implies she has subordinates - maybe ONE of whom could be assigned to thoroughly document this chaotic UAM mess that Grafana was so proud of talking about at GrafCON.

If you/she is still at a loss, just have her take a look here at all of the cries for help with AM templating. When there are this many people having trouble with it, it should be clear that: a) there is something wrong with the UI and/or b) there is something wrong with the architecture (hint: check on different template syntax for 20 different Contact Points) and/or c) there is something missing in the documentation. If you’re not going to fix a & b, then for pity sake, at least do “c” right!

Submit an issue to github? Grafana isn’t paying attention to AM issues there either.
Maybe people should just direct email Grafana at Contact Us | Grafana Labs or since nothing else seems to work.

Hello. How to do this -
A different template for each alert that triggers a notification in Slack and Email?
I will be keeping the copies of alert in a separate database(postgres) from which they should be read at the time of triggering the alert.

I know about adding custom template in contact points. But that would mean I have to create a new contact point for every template?

Hello! I am an engineer in the Alerting team at Grafana. Thank you for your feedback and we appreciate that a lot of users are frustrated with the documentation on templating alert notifications.

I, with the help of another engineer in the team, will be working on improving this documentation over the following weeks. Having read a number of topics on the community forum I think I have a good understanding of some of the most frequent issues people have and how we can improve the documentation to help with these issues.

I would love to collect feedback on frustrations with documentation on templating alert notifications if possible and we will attempt to address it with the planned work.



Thanks so much! How do you plan to collect feedback, what mechanism are you planning to use?

1 Like

I am happy to do it either on the community forum or on GitHub. Is there a preference from the community?

as you can see now there a quiet a few threads in this forum with lots of gems as it regards alerts. The main reason being := bad documentation. If the doco was clear we would not have this much threads on this subject.
They all need to be consolidate.
The issue is the documentation right? So that would be a centralized location, as it should be imho, where users go to get guidance. forum or github discussion, should be used for exceptions, bugs, people that are stuck, people that do not read doco :stuck_out_tongue_winking_eye: ?

I would highly recommend distinct documention per alert targets, separated into their own documentation

  • Teams
  • Slack
  • Telegram
  • etc

my 2 cents

1 Like

I second @yosiasz suggestion on documention per alert target (Contact Point?). Syntax per CP seems to be so different people will be confused to have to wade through syntax for CP “X”, when they need only to know about syntax, options, etc. for “Y”

I think the bulk of conversation on what is missing in docs has been here in the forums, so my vote is keep it here. That said, the actual documentation on alerting, though a work in progress, should always be at Alerting | Grafana documentation

Otherwise, it’s going to stay fragmented – the problem that we have now.


1 Like

This should seriously be addressed, why is it so different from one CP to another

1 Like

Absolutely – that makes it hard for users AND for Grafana to document and support.

Just to make sure there is no misunderstanding the documentation will be on the Grafana website; the community forum is useful though for getting feedback on the current documentation.

To give an update on this I am working with one of our technical writers on the documentation for templating, and we are also improving the documentation for the wider alerting product.

With regards to having documentation per contact point could you explain what you are looking for? The template syntax should be the same irrespective of contact point. What differences have you observed?

Many thanks!

1 Like

The other big challenge in addition to the documentation is the lack of code intellisense for a lot of us that have been spoiled with in IDEs we use for our daily dev efforts such as vs code