Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion infrastructure/monitoring/alertmanager/alertmanager.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,25 @@ route:
group_wait: 10s
group_interval: 30s
repeat_interval: 5m
receiver: 'slack-webhook'
# Default: dedicated OCB Slack channel (direct incoming webhook).
receiver: 'slack-direct'
routes:
# Aggregator-latency alerts keep their historical channel via the
# internal relay (#alerting-aggregator-latency).
- matchers:
- app = "aggregator_latency_monitor"
receiver: 'slack-webhook'

receivers:
- name: 'slack-direct'
slack_configs:
- api_url: '${SLACK_WEBHOOK_URL}'
send_resolved: true
title: '{{ if eq .Status "firing" }}⚠️{{ else }}✅{{ end }} {{ .CommonLabels.alertname }}'
text: |
{{ range .Alerts }}*{{ .Annotations.summary }}*
{{ .Annotations.description }}
{{ end }}
- name: 'slack-webhook'
webhook_configs:
- url: '${ALERT_WEBHOOK_URL}'
Expand Down
7 changes: 6 additions & 1 deletion infrastructure/monitoring/alertmanager/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ if [ -z "$ALERT_WEBHOOK_URL" ]; then
echo "WARNING: ALERT_WEBHOOK_URL not set — alerts will be dropped by the webhook receiver."
fi

sed "s|\${ALERT_WEBHOOK_URL}|${ALERT_WEBHOOK_URL}|g" \
if [ -z "$SLACK_WEBHOOK_URL" ]; then
echo "WARNING: SLACK_WEBHOOK_URL not set — default receiver will drop alerts."
fi

sed -e "s|\${ALERT_WEBHOOK_URL}|${ALERT_WEBHOOK_URL}|g" \
-e "s|\${SLACK_WEBHOOK_URL}|${SLACK_WEBHOOK_URL}|g" \
/etc/alertmanager/alertmanager.yml.tmpl \
> /etc/alertmanager/alertmanager.yml

Expand Down
Loading