See:
https://prometheus.io/docs/alerting/latest/notifications/
https://prometheus.io/docs/alerting/latest/notification_examples/
https://prometheus.io/docs/alerting/latest/configuration/#email_config

I believe this is the default template:
https://github.com/prometheus/alertmanager/blob/v0.25.0/template/email.tmpl

You specify the Subject template as an entry under "headers:".  If you 
don't define a subject header, then a default one is used, picked up from a 
shared template "__subject". See:
https://github.com/prometheus/alertmanager/blob/v0.25.0/template/default.tmpl#L4
https://github.com/prometheus/alertmanager/blob/v0.25.0/config/notifiers.go#L63-L64
https://github.com/prometheus/alertmanager/blob/v0.25.0/notify/email/email.go#L54-L56

Whether or not to send the resolve email is set using the attribute 
"send_resolved: true/false": see
https://prometheus.io/docs/alerting/latest/configuration/#email_config

Simple example:

receivers:
- name: foo
  email_configs:
  - to: 'f...@example.com'
    send_resolved: true
    headers:
      subject: '{{ if eq .Status "firing" }}DOWN{{ else if eq .Status 
"resolved" }}UP{{end}}'

(Note that a single notification may contain a group of alerts, some firing 
and some resolved.  .Status set to "firing" if at least one of them is 
firing)

On Friday, 27 January 2023 at 09:19:13 UTC prashan...@gmail.com wrote:

> Dear ALl,
>
> how can modfy alertmanager email format 
> 1. Subject 
> 2 Email body ( custom lable with values, start time )
> 3. Add  in email " Regrads - Automcation team in bottom of email alert.
> 4. Need reslove or ack email 
>
>
>
> Thanks,
> Prashant 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/e284ddce-761d-4d79-8570-6a7ebfc8c524n%40googlegroups.com.

Reply via email to