Software /
code /
prosody-modules
Changeset
4623:622c6308d7af
mod_pubsub_alertmanager: Minimal example of Prometheus and Alertmanager config
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 16 Jul 2021 17:34:24 +0200 |
parents | 4622:61ce3394fe8b |
children | 4624:eba7e68120d8 |
files | mod_pubsub_alertmanager/README.md |
diffstat | 1 files changed, 39 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pubsub_alertmanager/README.md Fri Jul 16 17:21:07 2021 +0200 +++ b/mod_pubsub_alertmanager/README.md Fri Jul 16 17:34:24 2021 +0200 @@ -20,6 +20,43 @@ # Configuration +## Prometheus + +A Prometheus `rule_files` might contain something along these lines: + +``` yaml +groups: +- name: Stuff + rules: + - alert: Down + expr: up == 0 + for: 5m + annotations: + title: 'Stuff is down!' + labels: + severity: 'critical' +``` + +## Alertmanager +On the Alertmanager site the webhook configuration may look something +like this: + +``` yaml +receivers: +- name: pubsub + webhook_configs: + - url: http://pubsub.localhost:5280/pubsub_alertmanager +``` + +And then finally some Alertmanager routes would point at that receiver: + +``` yaml +route: + receiver: pubsub +``` + +## Prosody + On the Prosody side, apart from creating and configuring the node(s) that will be used, configure your pubsub service like this: @@ -42,6 +79,8 @@ alertmanager_node_template = "alerts/{alert.labels.severity}" ``` +## All Options + Available configuration options: `alertmanager_body_template`