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