Hi everyone! 👋

I'm setting up custom notifications in Alertmanager for a Telegram 
receiver, and I want to send different messages when an alert is FIRING and 
when it is RESOLVED.

The issue I’m facing is that Alertmanager keeps repeating the FIRING 
message even after the issue is resolved. I want to ensure that only the 
RESOLVED message is sent when the problem is fixed.

Here’s my current configuration:
global:
  resolve_timeout: 5m

route:
  receiver: telegram_receiver
  group_by: ["alertname", "Host"]
  group_wait: 1s
  group_interval: 1s
  repeat_interval: 24h

  routes:
  - receiver: 'telegram_receiver'
    matchers:
    - severity="Critical"

receivers:
- name: 'telegram_receiver'
  telegram_configs:
  - api_url: 'https://api.telegram.org'
    send_resolved: true
    bot_token: xxxxx
    chat_id: ttttttttttttt
    message: '{{ range .Alerts }}Alert: {{ printf "%s\n" .Labels.alertname 
}}{{ printf "%s\n" .Annotations.summary }}{{ printf "%s\n" 
.Annotations.description }}{{ end }}'
    parse_mode: 'HTML'



  Does anyone have examples or best practices to share?  

-- 
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 visit 
https://groups.google.com/d/msgid/prometheus-users/b2ee4ffb-c6e5-4e07-bf41-4de283b78a54n%40googlegroups.com.

Reply via email to