About alertmanager.yml (email_configs and custom subject)

27 views
Skip to first unread message

Jseb Tarot

unread,
Aug 23, 2023, 6:03:29 AM8/23/23
to Prometheus Users
Hello,


I have a question about alertmanager configuration section email_configs:



This configuration works for now:

receivers:
  - name: "1234...."
    email_configs:
   - to: 'xx...@yyyy.gg'
      from: 'xx...@yyyy.gg'
      smarthost: mailhost.xxxxx.yy:25
      send_resolved: true

But if i add this fields headers for addding template subject  it' working ?
receivers:
  - name: "1234...."
    email_configs:
   - to: 'xx...@yyyy.gg'
      from: 'xx...@yyyy.gg'
      headers:
          subject: [{{ .GroupLabels.severity }}] {{ $labels.my_tag }} {{ $labels.instance }} blablabla
      smarthost: mailhost.xxxxx.yy:25
      send_resolved: true


Thanks,

Regards,

JsT
Reply all
Reply to author
Forward
0 new messages