comparison mod_pubsub_alertmanager/README.md @ 5485:67190744b1eb

mod_pubsub_alertmanager: Support for per-path config overrides
author Matthew Wild <mwild1@gmail.com>
date Tue, 23 May 2023 19:40:38 +0100
parents eba7e68120d8
children
comparison
equal deleted inserted replaced
5484:bb083e9f78dd 5485:67190744b1eb
91 `alertmanager_body_template` 91 `alertmanager_body_template`
92 : Template for the textual representation of alerts. 92 : Template for the textual representation of alerts.
93 93
94 `alertmanager_node_template` 94 `alertmanager_node_template`
95 : Template for the pubsub node name, defaults to `"{path?alerts}"` 95 : Template for the pubsub node name, defaults to `"{path?alerts}"`
96
97 `alertmanager_path_configs`
98 : Per-path configuration variables (see below).
99
100 ### Per-path configuration
101
102 It's possible to override configuration options based on the path suffix. For
103 example, if a request is made to `http://prosody/pubsub_alertmanager/foo` the
104 path suffix is `foo`. You can then supply the following configuration:
105
106 ``` lua
107 alertmanager_path_configs = {
108 foo = {
109 node_template = "alerts/{alert.labels.severity}";
110 publisher = "user@example.net";
111 };
112 }
113 ```