Hi Brian,

Many thanks for your help. I am almost able to achieve whatever I wanted to 
but with one receiver. When i add two receiver and try to send the alerts. 
Based on the matcher alerts are fired and sent to the receiver but resolved 
alerts are not going. Could you please verify my configs and let me know if 
am on right track please. I am not able to get any error or any insight 
from the alertmanger.log.

 global:
  resolve_timeout: 5m
  smtp_smarthost: *******:25
  smtp_auth_username: '*****'
  smtp_auth_identity: '*****'
  smtp_auth_password: '******'
  smtp_from: '********'
  smtp_require_tls: false

route:
  group_by: ['alertname']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 5m
  receiver: 'App-Kafka-Support'
  routes:
  - receiver: 'Statuspal'
    matchers:
    - typeofalert="statuspal"
    continue: true

receivers:
- name: 'App-Kafka-Support'
  email_configs:
  - to: '[email protected]'
    send_resolved: true
- name: 'Statuspal'
  email_configs:
  - to: '[email protected]'
    headers:
      subject: '{{ if eq .Status "firing" }}DOWN{{ else if eq .Status 
"resolved" }}UP{{end}}'
    send_resolved: true

Best Regards,
Suman

On Wednesday, November 24, 2021 at 3:46:59 PM UTC+5:30 Brian Candler wrote:

> On Wednesday, 24 November 2021 at 09:21:54 UTC [email protected] wrote:
>
>> I am assuming that if we have used send_resolved:true then once the alert 
>> is resolved .Status value will be set to resolved and the subject would be 
>> updated accordingly. 
>>
>> For me I am not able to see any errors in the log file. Alertmanager 
>> service and prometheus are up and running fine. Alerts are activated in 
>> Prometheus but emails have not trigerred so far.
>
>
> Then it's up to you to either create an alert condition or resolve an 
> alert condition, to force an alert to be sent out.  Or wait for the 
> repeat_interval (24h) if there are already active alerts.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/7620b63f-6543-4f4b-9eb1-6aa710ff3aa1n%40googlegroups.com.

Reply via email to