grafana/emails
George Robinson 802d67eeca
Alerting: Support values in notification templates (#56457)
We have received a lot of feedback regarding the ValueString in alert notifications. Perhaps one of the most frequent complaints about ValueString is that it is difficult to read because it contains a lot of information, and the information is shown as a JSON-like string. Users have often asked how it can be templated and the answer is that it can't.

Until now users have been able to add custom annotations to their alert rules which contains values via the $values variable added in previous versions of Grafana. However, these custom annotations must be added for each of the user's alert rule, instead of once in a template that all of their alerts can be notified via.

This commit adds then the much requested feature to support values in notification templates. Users can then create a single template that prints the annotations, labels and values of their alerts in a format of their choice!
2022-10-10 13:40:21 +01:00
..
assets/css Alerting: Layout fixes for email template (#40676) 2021-10-22 09:12:37 +02:00
grunt Email: Allow configuration of content types for email notifications (#34530) 2021-07-19 13:31:51 +03:00
templates Alerting: Support values in notification templates (#56457) 2022-10-10 13:40:21 +01:00
gruntfile.js Prettier: Upgrade to 2 (#30387) 2021-01-20 07:59:48 +01:00
package.json Emails: Update notification templates (#19662) 2019-10-31 10:33:33 -07:00
README.md Email: Allow configuration of content types for email notifications (#34530) 2021-07-19 13:31:51 +03:00

Prerequisites

  • npm install
  • gem install premailer

Tasks

  • npm run build (default task will build new inlines email templates)
  • npm start (builds on source HTML, text, or CSS change)

Result

Assembled email templates will be in dist/ and final inlined templates will be in ../public/emails/