re-organize the README
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
dbb90251c2
commit
79690b66ca
59
README.md
59
README.md
|
@ -2,39 +2,8 @@
|
||||||
|
|
||||||
This role configures [AlertManager](https://prometheus.io/docs/alerting/alertmanager/) to notify people of threshold breaches in rules configured in Prometheus __master__ instance.
|
This role configures [AlertManager](https://prometheus.io/docs/alerting/alertmanager/) to notify people of threshold breaches in rules configured in Prometheus __master__ instance.
|
||||||
|
|
||||||
# Service
|
|
||||||
|
|
||||||
AlertManager runs in a cluster to achieve high availability. The peer connect via [Tinc VPN](https://github.com/status-im/infra-role-bootstrap/tree/master/tasks/tinc).
|
|
||||||
The service listens on `:9093` and the Prometheus instance connects to that port via the VPN to inform it of threshold breaches.
|
|
||||||
|
|
||||||
The service UI is available at: https://alerts.status.im/
|
|
||||||
|
|
||||||
# CLI Tool
|
|
||||||
|
|
||||||
You can manage existing alerts by using the `amtool` on any of the hosts running this:
|
|
||||||
```
|
|
||||||
> amtool alert
|
|
||||||
Alertname Starts At Summary
|
|
||||||
Test_Alert 2018-07-06 18:30:18 UTC This is a testing alert!
|
|
||||||
> amtool silence
|
|
||||||
ID Matchers Starts At Ends At Updated At Created By Comment
|
|
||||||
9635b573-5177-4601-a3b0-ac6a25d0a4ef alertname=InstanceDown 2018-07-06 12:37:04 UTC 2018-07-06 14:36:05 UTC 2018-07-06 12:37:04 UTC jakubgs test
|
|
||||||
```
|
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
The main configuration resides in [`templates/alertmanager.yml.j2`](templates/alertmanager.yml.j2). It configures all the receivers of alerts generated by Prometheus __master__ instance.
|
|
||||||
|
|
||||||
The are three main sections:
|
|
||||||
|
|
||||||
* `global` - Configure general auth related options for SMTP and Slack receivers.
|
|
||||||
* `receivers` - Defines destinations of alets which can be used in the `route` section.
|
|
||||||
* `route` - Defines rules based on which alerts are directed to defined receivers.
|
|
||||||
|
|
||||||
For more details see: https://prometheus.io/docs/alerting/configuration/
|
|
||||||
|
|
||||||
# Ansible Variables
|
|
||||||
|
|
||||||
The bare minimum should be:
|
The bare minimum should be:
|
||||||
```yml
|
```yml
|
||||||
alertmanager_domain: 'alerts.example.org'
|
alertmanager_domain: 'alerts.example.org'
|
||||||
|
@ -48,3 +17,31 @@ alertmanager_victorops_api_key: 'secret-victorops-api-key'
|
||||||
alertmanager_victorops_routing_key: 'alert-manager'
|
alertmanager_victorops_routing_key: 'alert-manager'
|
||||||
```
|
```
|
||||||
Take note you will have to create an `alert-manager` routing rule in VictorOps.
|
Take note you will have to create an `alert-manager` routing rule in VictorOps.
|
||||||
|
|
||||||
|
# Management
|
||||||
|
|
||||||
|
You can manage existing alerts by using the `amtool` on any of the hosts running this:
|
||||||
|
```
|
||||||
|
> amtool alert
|
||||||
|
Alertname Starts At Summary
|
||||||
|
Test_Alert 2018-07-06 18:30:18 UTC This is a testing alert!
|
||||||
|
> amtool silence
|
||||||
|
ID Matchers Starts At Ends At Updated At Created By Comment
|
||||||
|
9635b573-5177-4601-a3b0-ac6a25d0a4ef alertname=InstanceDown 2018-07-06 12:37:04 UTC 2018-07-06 14:36:05 UTC 2018-07-06 12:37:04 UTC jakubgs test
|
||||||
|
```
|
||||||
|
|
||||||
|
# Details
|
||||||
|
|
||||||
|
AlertManager runs in a cluster to achieve high availability. The peer connect via [Tinc VPN](https://github.com/status-im/infra-role-bootstrap/tree/master/tasks/tinc).
|
||||||
|
The service listens on `:9093` and the Prometheus instance connects to that port via the VPN to inform it of threshold breaches.
|
||||||
|
|
||||||
|
The main configuration resides in [`templates/alertmanager.yml.j2`](templates/alertmanager.yml.j2).
|
||||||
|
It configures all the receivers of alerts generated by Prometheus __master__ instance.
|
||||||
|
|
||||||
|
The are three main sections:
|
||||||
|
|
||||||
|
* `global` - Configure general auth related options for SMTP and Slack receivers.
|
||||||
|
* `receivers` - Defines destinations of alets which can be used in the `route` section.
|
||||||
|
* `route` - Defines rules based on which alerts are directed to defined receivers.
|
||||||
|
|
||||||
|
For more details see: https://prometheus.io/docs/alerting/configuration/
|
||||||
|
|
Loading…
Reference in New Issue