From 2617d00e7567360b99c5430e9b6a423fc59d0688 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 6 Jul 2024 21:53:08 +0300 Subject: [PATCH] Adjust indentation for matrix-alertmanager-receiver --- ...figuring-playbook-alertmanager-receiver.md | 28 +++++++++---------- .../defaults/main.yml | 26 ++++++++--------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/configuring-playbook-alertmanager-receiver.md b/docs/configuring-playbook-alertmanager-receiver.md index f85facefe..3fd90643c 100644 --- a/docs/configuring-playbook-alertmanager-receiver.md +++ b/docs/configuring-playbook-alertmanager-receiver.md @@ -72,20 +72,20 @@ Then, you can proceed to [Usage](#usage). Configure your Prometheus Alertmanager with configuration like this: ```yml - receivers: - - name: matrix - webhook_configs: - - send_resolved: true - url: URL_HERE - route: - group_by: - - namespace - group_interval: 5m - group_wait: 30s - receiver: "matrix" - repeat_interval: 12h - routes: - - receiver: matrix +receivers: + - name: matrix + webhook_configs: + - send_resolved: true + url: URL_HERE +route: + group_by: + - namespace + group_interval: 5m + group_wait: 30s + receiver: "matrix" + repeat_interval: 12h + routes: + - receiver: matrix ``` .. where `URL_HERE` looks like `https://matrix.DOMAIN/matrix-alertmanager-receiver-RANDOM_VALUE_HERE/alert/some-room-name` or `https://matrix.DOMAIN/matrix-alertmanager-receiver-RANDOM_VALUE_HERE/alert/!some-room-id:DOMAIN`. diff --git a/roles/custom/matrix-alertmanager-receiver/defaults/main.yml b/roles/custom/matrix-alertmanager-receiver/defaults/main.yml index d802c9c77..d88db1cb1 100644 --- a/roles/custom/matrix-alertmanager-receiver/defaults/main.yml +++ b/roles/custom/matrix-alertmanager-receiver/defaults/main.yml @@ -156,19 +156,19 @@ matrix_alertmanager_receiver_config_templating_generator_url_mapping: {} # Controls the `templating.computed-values` configuration setting. matrix_alertmanager_receiver_config_templating_computed_values: "{{ matrix_alertmanager_receiver_config_templating_computed_values_default + matrix_alertmanager_receiver_config_templating_computed_values_auto + matrix_alertmanager_receiver_config_templating_computed_values_custom }}" matrix_alertmanager_receiver_config_templating_computed_values_default: - - values: # always set 'color' to 'yellow' - color: yellow - - values: # set 'color' to 'orange' when alert label 'severity' is 'warning' - color: orange - when-matching-labels: - severity: warning - - values: # set 'color' to 'red' when alert label 'severity' is 'critical' - color: red - when-matching-labels: - severity: critical - - values: # set 'color' to 'green' when alert status is 'resolved' - color: green - when-matching-status: resolved + - values: # always set 'color' to 'yellow' + color: yellow + - values: # set 'color' to 'orange' when alert label 'severity' is 'warning' + color: orange + when-matching-labels: + severity: warning + - values: # set 'color' to 'red' when alert label 'severity' is 'critical' + color: red + when-matching-labels: + severity: critical + - values: # set 'color' to 'green' when alert status is 'resolved' + color: green + when-matching-status: resolved matrix_alertmanager_receiver_config_templating_computed_values_auto: [] matrix_alertmanager_receiver_config_templating_computed_values_custom: []