From c0641a0ca62fe3312f8da44602240da0db4e0f83 Mon Sep 17 00:00:00 2001 From: Gilles De Mey Date: Sat, 22 Jun 2024 13:20:51 +0200 Subject: [PATCH] Devenv: Allow configuring alertmanager config for prometheus docker block (#89558) --- devenv/docker/blocks/prometheus/alertmanager.yml | 16 ++++++++++++++++ .../docker/blocks/prometheus/docker-compose.yaml | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 devenv/docker/blocks/prometheus/alertmanager.yml diff --git a/devenv/docker/blocks/prometheus/alertmanager.yml b/devenv/docker/blocks/prometheus/alertmanager.yml new file mode 100644 index 00000000000..7bd5e0c5d30 --- /dev/null +++ b/devenv/docker/blocks/prometheus/alertmanager.yml @@ -0,0 +1,16 @@ +route: + group_by: ['alertname'] + group_wait: 30s + group_interval: 5m + repeat_interval: 1h + receiver: 'web.hook' +receivers: + - name: 'web.hook' + webhook_configs: + - url: 'http://127.0.0.1:5001/' +inhibit_rules: + - source_match: + severity: 'critical' + target_match: + severity: 'warning' + equal: ['alertname', 'dev', 'instance'] diff --git a/devenv/docker/blocks/prometheus/docker-compose.yaml b/devenv/docker/blocks/prometheus/docker-compose.yaml index 416064bd196..6cda0259dc6 100644 --- a/devenv/docker/blocks/prometheus/docker-compose.yaml +++ b/devenv/docker/blocks/prometheus/docker-compose.yaml @@ -25,7 +25,11 @@ FD_DATASOURCE: prom alertmanager: - image: quay.io/prometheus/alertmanager + image: prom/alertmanager + volumes: + - ${PWD}/docker/blocks/prometheus/alertmanager.yml:/etc/alertmanager/alertmanager.yml + command: > + --config.file=/etc/alertmanager/alertmanager.yml ports: - "9093:9093"