alert_forwarder module

Forward incoming Alertmanager alerts to Slack and/or Telegram.

Environment variables used: - SLACK_WEBHOOK_URL: Incoming webhook URL for Slack (optional) - ALERT_TELEGRAM_BOT_TOKEN: Bot token for Telegram (optional) - ALERT_TELEGRAM_CHAT_ID: Chat ID (or channel) to send alerts to (optional) - ALERT_TELEGRAM_SUPPRESS_ALERTS: Comma-separated alert names to skip on Telegram (optional)

If none are configured, alerts will still be emitted as structured events.

alert_forwarder.emit_event(event, severity='info', **fields)[מקור]
פרמטרים:
alert_forwarder.forward_alerts(alerts)[מקור]

Forward a list of Alertmanager alerts to configured sinks, respecting silences (best-effort).

Return type:

None

פרמטרים:

alerts (List[Dict[str, Any]])