From fd139b463bb8d6b24dc730ea1cc7d81dd2921e95 Mon Sep 17 00:00:00 2001 From: Roman Khavronenko Date: Mon, 20 Feb 2023 16:39:31 +0100 Subject: [PATCH] docs: update vmalert docs (#3843) Signed-off-by: hagen1778 --- app/vmalert/README.md | 42 +++++++++++++++++++++--------------------- docs/vmalert.md | 42 +++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/app/vmalert/README.md b/app/vmalert/README.md index a7722fd026..2611f44415 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -28,7 +28,8 @@ Use this feature for the following cases: * Graphite datasource can be used for alerting and recording rules. See [these docs](#graphite); * Recording and Alerting rules backfilling (aka `replay`). See [these docs](#rules-backfilling); * Lightweight and without extra dependencies. -* Supports [reusable templates](#reusable-templates) for annotations. +* Supports [reusable templates](#reusable-templates) for annotations; +* Load of recording and alerting rules from local filesystem, GCS and S3. ## Limitations @@ -99,26 +100,6 @@ groups: [ - ] ``` -### Reading rules from object storage - -[Enterprise version](https://docs.victoriametrics.com/enterprise.html) of `vmalert` may read alerting and recording rules -from object storage: - -- `./bin/vmalert -rule=s3://bucket/dir/alert.rules` would read rules from the given path at S3 bucket -- `./bin/vmalert -rule=gs://bucket/bir/alert.rules` would read rules from the given path at GCS bucket - -S3 and GCS paths support only matching by prefix, e.g. `s3://bucket/dir/rule_` matches -all files with prefix `rule_` in the folder `dir`. - -The following [command-line flags](#flags) can be used for fine-tuning access to S3 and GCS: - -- `-s3.credsFilePath` - path to file with GCS or S3 credentials. Credentials are loaded from default locations if not set. -- `-s3.configFilePath` - path to file with S3 configs. Configs are loaded from default location if not set. -- `-s3.configProfile` - profile name for S3 configs. If no set, the value of the environment variable will be loaded (`AWS_PROFILE` or `AWS_DEFAULT_PROFILE`). -- `-s3.customEndpoint` - custom S3 endpoint for use with S3-compatible storages (e.g. MinIO). S3 is used if not set. -- `-s3.forcePathStyle` - prefixing endpoint with bucket name when set false, true by default. - - ### Groups Each group has the following attributes: @@ -424,6 +405,25 @@ The enterprise version of vmalert is available in `vmutils-*-enterprise.tar.gz` at [release page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases) and in `*-enterprise` tags at [Docker Hub](https://hub.docker.com/r/victoriametrics/vmalert/tags). +### Reading rules from object storage + +[Enterprise version](https://docs.victoriametrics.com/enterprise.html) of `vmalert` may read alerting and recording rules +from object storage: + +- `./bin/vmalert -rule=s3://bucket/dir/alert.rules` would read rules from the given path at S3 bucket +- `./bin/vmalert -rule=gs://bucket/bir/alert.rules` would read rules from the given path at GCS bucket + +S3 and GCS paths support only matching by prefix, e.g. `s3://bucket/dir/rule_` matches +all files with prefix `rule_` in the folder `dir`. + +The following [command-line flags](#flags) can be used for fine-tuning access to S3 and GCS: + +- `-s3.credsFilePath` - path to file with GCS or S3 credentials. Credentials are loaded from default locations if not set. +- `-s3.configFilePath` - path to file with S3 configs. Configs are loaded from default location if not set. +- `-s3.configProfile` - profile name for S3 configs. If no set, the value of the environment variable will be loaded (`AWS_PROFILE` or `AWS_DEFAULT_PROFILE`). +- `-s3.customEndpoint` - custom S3 endpoint for use with S3-compatible storages (e.g. MinIO). S3 is used if not set. +- `-s3.forcePathStyle` - prefixing endpoint with bucket name when set false, true by default. + ### Topology examples The following sections are showing how `vmalert` may be used and configured diff --git a/docs/vmalert.md b/docs/vmalert.md index fdaae4b6e6..3174642b33 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -32,7 +32,8 @@ Use this feature for the following cases: * Graphite datasource can be used for alerting and recording rules. See [these docs](#graphite); * Recording and Alerting rules backfilling (aka `replay`). See [these docs](#rules-backfilling); * Lightweight and without extra dependencies. -* Supports [reusable templates](#reusable-templates) for annotations. +* Supports [reusable templates](#reusable-templates) for annotations; +* Load of recording and alerting rules from local filesystem, GCS and S3. ## Limitations @@ -103,26 +104,6 @@ groups: [ - ] ``` -### Reading rules from object storage - -[Enterprise version](https://docs.victoriametrics.com/enterprise.html) of `vmalert` may read alerting and recording rules -from object storage: - -- `./bin/vmalert -rule=s3://bucket/dir/alert.rules` would read rules from the given path at S3 bucket -- `./bin/vmalert -rule=gs://bucket/bir/alert.rules` would read rules from the given path at GCS bucket - -S3 and GCS paths support only matching by prefix, e.g. `s3://bucket/dir/rule_` matches -all files with prefix `rule_` in the folder `dir`. - -The following [command-line flags](#flags) can be used for fine-tuning access to S3 and GCS: - -- `-s3.credsFilePath` - path to file with GCS or S3 credentials. Credentials are loaded from default locations if not set. -- `-s3.configFilePath` - path to file with S3 configs. Configs are loaded from default location if not set. -- `-s3.configProfile` - profile name for S3 configs. If no set, the value of the environment variable will be loaded (`AWS_PROFILE` or `AWS_DEFAULT_PROFILE`). -- `-s3.customEndpoint` - custom S3 endpoint for use with S3-compatible storages (e.g. MinIO). S3 is used if not set. -- `-s3.forcePathStyle` - prefixing endpoint with bucket name when set false, true by default. - - ### Groups Each group has the following attributes: @@ -428,6 +409,25 @@ The enterprise version of vmalert is available in `vmutils-*-enterprise.tar.gz` at [release page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases) and in `*-enterprise` tags at [Docker Hub](https://hub.docker.com/r/victoriametrics/vmalert/tags). +### Reading rules from object storage + +[Enterprise version](https://docs.victoriametrics.com/enterprise.html) of `vmalert` may read alerting and recording rules +from object storage: + +- `./bin/vmalert -rule=s3://bucket/dir/alert.rules` would read rules from the given path at S3 bucket +- `./bin/vmalert -rule=gs://bucket/bir/alert.rules` would read rules from the given path at GCS bucket + +S3 and GCS paths support only matching by prefix, e.g. `s3://bucket/dir/rule_` matches +all files with prefix `rule_` in the folder `dir`. + +The following [command-line flags](#flags) can be used for fine-tuning access to S3 and GCS: + +- `-s3.credsFilePath` - path to file with GCS or S3 credentials. Credentials are loaded from default locations if not set. +- `-s3.configFilePath` - path to file with S3 configs. Configs are loaded from default location if not set. +- `-s3.configProfile` - profile name for S3 configs. If no set, the value of the environment variable will be loaded (`AWS_PROFILE` or `AWS_DEFAULT_PROFILE`). +- `-s3.customEndpoint` - custom S3 endpoint for use with S3-compatible storages (e.g. MinIO). S3 is used if not set. +- `-s3.forcePathStyle` - prefixing endpoint with bucket name when set false, true by default. + ### Topology examples The following sections are showing how `vmalert` may be used and configured