Comparison

mod_pubsub_alertmanager/README.md @ 4622:61ce3394fe8b

mod_pubsub_alertmanager: Add a README with initial docs
author Kim Alvefur <zash@zash.se>
date Fri, 16 Jul 2021 17:21:07 +0200
child 4623:622c6308d7af
comparison
equal deleted inserted replaced
4621:ebc2c099a11b 4622:61ce3394fe8b
1 ---
2 labels:
3 - 'Stage-Alpha'
4 summary: Alertmanager webhook receiver for pubsub
5 ---
6
7 # Introduction
8
9 This module lets
10 [Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/)
11 publish alerts to [pubsub][doc:pubsub] via
12 [webhooks](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
13
14 # Setup
15
16 The relevant pubsub nodes must be created and configured somehow.
17 Because the request IP address is used to publish, the `publisher`
18 affiliation should be given to the IP address Alertmanager sends
19 webhooks from.
20
21 # Configuration
22
23 On the Prosody side, apart from creating and configuring the node(s)
24 that will be used, configure your pubsub service like this:
25
26 ``` lua
27 Component "pubsub.example.com" "pubsub"
28 modules_enabled = {
29 "pubsub_alertmanager",
30 }
31
32 -- optional extra settings:
33 alertmanager_body_template = [[
34 *ALARM!* {annotations.title?Alert} is {status}
35 Since {startsAt}{endsAt& until {endsAt}}
36 Labels: {labels%
37 {idx}: {item}}
38 Annotations: {annotations%
39 {idx}: {item}}
40 ]]
41
42 alertmanager_node_template = "alerts/{alert.labels.severity}"
43 ```
44
45 Available configuration options:
46
47 `alertmanager_body_template`
48 : Template for the textual representation of alerts.
49
50 `alertmanager_node_template`
51 : Template for the pubsub node name, defaults to `"{path?alerts}"`