Files
cozystack/packages/extra
Yan Bondarenko 2405f0f3fd feat(monitoring): take an Alertmanager template file for alert emails
The email receiver added in #3800 sends the default Alertmanager
subject and HTML body, a subject that strings together every common
label of the group and a table of labels and annotations. Subject and
body templates were left out of the values on purpose, because
Alertmanager parses inline templates only when it sends, so a broken
one drops mail with nothing but a log line to show for it.

alerta.alerts.email.template takes the text of a template file
instead. The chart stores it in the alertmanager-email-template
ConfigMap and lists it in VMAlertmanager spec.templates. The operator
mounts it, adds it to the configuration templates and has the config
reloader watch the mounted directory, so Alertmanager parses the file
while loading its configuration. Defining email.default.subject and
email.default.html in it replaces the subject and the body of every
email.

The text has to contain a define action, a value that is not text
fails the render, and template counts as a set field for the check
that rejects a partial email configuration.

Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
2026-10-26 17:06:42 +03:00
..