Hi All,
I still cannot realize how I can apply my own custom html template for e-mail alert in alert-manager config. Currently, I receive an empty e-mail alert.
Can you help me with that?
My current config alert-manager config:
html: '{{ define "email.tmpl" }} {{ end }}
{{ template "email.tmpl" . }}'
I receive the following error although email.tmpl exists in that folder.
ERRO[16307] Notify for 1 alerts failed: Cancelling notify retry for "email" due to unrecoverable error: executing email html template:
html/template::1:48: no such template "/etc/alertmanager/template/email.tmpl" source="dispatch.go:261"
Thanks in advance.
Enter code here...
global:
smtp_smarthost: 'your-smtp-server:25'
smtp_from: 'fr...@emaildomain.com'
templates:
- /etc/prometheus/alertmanager/template/*.tmpl
route:
receiver: default
receivers:
- name: default
email_configs:
- to: 't...@emaildomain.com'
require_tls: false
html: '{{ template "email.html" . }}'
ERRO[16307] Notify for 1 alerts failed: Cancelling notify retry for "email" due to unrecoverable error: executing email html template:
html/template::1:48: no such template "/etc/alertmanager/template/email.tmpl" source="dispatch.go:261"