From e9860b2fa3712e9ab509fb2bf49e6b3ea6c669c7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 30 Jul 2020 21:56:48 +0300 Subject: [PATCH] docs/vmalert.md: sync with app/vmalert/README.md --- docs/vmalert.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/vmalert.md b/docs/vmalert.md index 07aba91ee7..88c85d8e00 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -44,10 +44,19 @@ compatible storage address for storing recording rules results and alerts state Then configure `vmalert` accordingly: ``` ./bin/vmalert -rule=alert.rules \ - -datasource.url=http://localhost:8428 \ - -notifier.url=http://localhost:9093 + -datasource.url=http://localhost:8428 \ # PromQL compatible datasource + -notifier.url=http://localhost:9093 \ # AlertManager URL + -notifier.url=http://127.0.0.1:9093 \ # AlertManager replica URL + -remoteWrite.url=http://localhost:8428 \ # remote write compatible storage to persist rules + -remoteRead.url=http://localhost:8428 \ # PromQL compatible datasource to restore alerts state from + -external.label=cluster=east-1 \ # External label to be applied for each rule + -external.label=replica=a \ # Multiple external labels may be set + -evaluationInterval=3s # Default evaluation interval if not specified in rules group ``` +If you run multiple `vmalert` services for the same datastore or AlertManager - do not forget +to specify different `external.label` flags in order to define which `vmalert` generated rules or alerts. + Configuration for [recording](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) and [alerting](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) rules is very similar to Prometheus rules and configured using YAML. Configuration examples may be found @@ -174,6 +183,8 @@ Usage of vmalert: How often to evaluate the rules (default 1m0s) -external.url string External URL is used as alert's source for sent alerts to the notifier + -external.label array + Optional label in the form 'name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. -httpListenAddr string Address to listen for http connections (default ":8880") -metricsAuthKey string