mgr/cephadm: Enhance AlertManagerSpec to allow adding additional webhook receiver URLs
Add the ability to configure webhook receiver URLs for additional external webhooks. This enhancement will be as simple as possible, there are no plans to support all alertmanager configuration features. The implementation will consider a later expansion.
service_type: alertmanager service_id: xyz user_data: default_webhook_urls: - "https://foo" - "https://bar"
The alertmanager.yml file will now contain a 'default' receiver configuration where these additional URLs will be added. A second route will contain the already existing receiver configuration for the Dashboard.
The resulting alertmanager.yml file will look like:
# This file is generated by cephadm. # See https://prometheus.io/docs/alerting/configuration/ for documentation. global: resolve_timeout: 5m route: receiver: 'default' routes: - group_by: ['alertname'] group_wait: 10s group_interval: 10s repeat_interval: 1h receiver: 'ceph-dashboard' receivers: - name: 'default' webhook_configs: - url: 'https://foo' - url: 'https://bar' - name: 'ceph-dashboard' webhook_configs: - url: 'https://localhost:41211/api/prometheus_receiver'