# Receiver of Prometheus Alertmanager for the Inbox of the portal.
# Each alert in a notification becomes one alert of the Inbox. The Inbox merges the repeats
# of one alert: it compares the fingerprint, the status and startsAt. So a retry of
# Alertmanager and a repeat_interval never make a second alert.
# The URL is the address of the portal (the same host and port as the pages).
# The last path element is the group.
# The token is an API key (api_...). Use the value of a block `api_key` of the file,
# or a key that an account made in the tab Access.
# The key and its owner need the permission alert.send on the group.
# Use HTTPS when the token crosses a network.
route:
  receiver: inbox-oncall
  group_by: ["alertname"]
  group_wait: 10s
  group_interval: 1m
  repeat_interval: 4h

receivers:
  - name: inbox-oncall
    webhook_configs:
      - url: http://portal:4181/api/v1/webhooks/alertmanager/infra
        send_resolved: false
        max_alerts: 50
        http_config:
          authorization:
            type: Bearer
            credentials_file: /etc/alertmanager/inbox_token
