From f088162c8aadf7a56aa9388b30989933b360bfd7 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 26 Sep 2022 08:46:21 +0300 Subject: [PATCH] docs/vmalert.md: follow-up for 0c95f928ae13d2f43ab3bb9ee3323cae12e5b4c1 - Clarify the description for -datasource.queryStep command-line flag - Consistently use a single dash in front of -datasource.queryStep command-line flag - Update -help output at docs/vmalert.md --- app/vmalert/README.md | 2 +- app/vmalert/datasource/init.go | 6 +++--- docs/CHANGELOG.md | 4 ++-- docs/vmalert.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/vmalert/README.md b/app/vmalert/README.md index 327941784..46ebbd063 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -637,7 +637,7 @@ The shortlist of configuration flags is the following: -datasource.oauth2.tokenUrl string Optional OAuth2 tokenURL to use for -datasource.url. -datasource.queryStep duration - queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead. + How far a value can fallback to when evaluating queries. For example, if -datasource.queryStep=15s then param "step" with value "15s" will be added to every query. If set to 0, rule's evaluation interval will be used instead. (default 5m0s) -datasource.queryTimeAlignment Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true) -datasource.roundDigits int diff --git a/app/vmalert/datasource/init.go b/app/vmalert/datasource/init.go index f7e859357..37b6b7e31 100644 --- a/app/vmalert/datasource/init.go +++ b/app/vmalert/datasource/init.go @@ -39,9 +39,9 @@ var ( oauth2Scopes = flag.String("datasource.oauth2.scopes", "", "Optional OAuth2 scopes to use for -datasource.url. Scopes must be delimited by ';'") lookBack = flag.Duration("datasource.lookback", 0, `Lookback defines how far into the past to look when evaluating queries. For example, if the datasource.lookback=5m then param "time" with value now()-5m will be added to every query.`) - queryStep = flag.Duration("datasource.queryStep", 5*time.Minute, "queryStep defines how far a value can fallback to when evaluating queries. "+ - "For example, if datasource.queryStep=15s then param \"step\" with value \"15s\" will be added to every query."+ - "If queryStep is set to 0, rule's evaluationInterval will be used instead.") + queryStep = flag.Duration("datasource.queryStep", 5*time.Minute, "How far a value can fallback to when evaluating queries. "+ + "For example, if -datasource.queryStep=15s then param \"step\" with value \"15s\" will be added to every query. "+ + "If set to 0, rule's evaluation interval will be used instead.") queryTimeAlignment = flag.Bool("datasource.queryTimeAlignment", true, `Whether to align "time" parameter with evaluation interval.`+ "Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257") maxIdleConnections = flag.Int("datasource.maxIdleConnections", 100, `Defines the number of idle (keep-alive connections) to each configured datasource. Consider setting this value equal to the value: groups_total * group.concurrency. Too low a value may result in a high number of sockets in TIME_WAIT state.`) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d951bf44f..f32c2152a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,7 +15,7 @@ The following tip changes can be tested by building VictoriaMetrics components f ## v1.79.x long-time support release (LTS) -**Update note 1:** [vmalert](https://docs.victoriametrics.com/vmalert.html) changes default value for command-line flag `datasource.queryStep` from `0s` to `5m`. The change supposed to improve reliability of the rules evaluation when evaluation interval is lower than scraping interval. +**Update note 1:** [vmalert](https://docs.victoriametrics.com/vmalert.html) changes default value for command-line flag `-datasource.queryStep` from `0s` to `5m`. The change supposed to improve reliability of the rules evaluation when evaluation interval is lower than scraping interval. * FEATURE: expose `vmagent_remotewrite_queues` metric and use it in alerting rules in order to improve the detection of remote storage connection saturation. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2871). @@ -29,7 +29,7 @@ The following tip changes can be tested by building VictoriaMetrics components f * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): re-evaluate annotations per each alert evaluation. Previously, annotations were evaluated only on alert's value ch ange. This could result in stale annotations in some cases described in [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3119). * BUGFIX: prevent from excessive CPU usage when the storage enters [read-only mode](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#readonly-mode). The previous fix in [v1.79.3](https://docs.victoriametrics.com/CHANGELOG.html#v1793) wasn't complete. -* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): change default value for command-line flag `datasource.queryStep` from `0s` to `5m`. Param `step` is added by vmalert to every rule evaluation request sent to datasource. Before this change, `step` was equal to group's evaluation interval by default. Param `step` for instant queries defines how far VM can look back for the last written data point. The change supposed to improve reliability of the rules evaluation when evaluation interval is lower than scraping interval. +* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): change default value for command-line flag `-datasource.queryStep` from `0s` to `5m`. Param `step` is added by vmalert to every rule evaluation request sent to datasource. Before this change, `step` was equal to group's evaluation interval by default. Param `step` for instant queries defines how far VM can look back for the last written data point. The change supposed to improve reliability of the rules evaluation when evaluation interval is lower than scraping interval. ## [v1.79.3](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.79.3) diff --git a/docs/vmalert.md b/docs/vmalert.md index ae39ddee8..dac3b750b 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -641,7 +641,7 @@ The shortlist of configuration flags is the following: -datasource.oauth2.tokenUrl string Optional OAuth2 tokenURL to use for -datasource.url. -datasource.queryStep duration - queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead. + How far a value can fallback to when evaluating queries. For example, if -datasource.queryStep=15s then param "step" with value "15s" will be added to every query. If set to 0, rule's evaluation interval will be used instead. (default 5m0s) -datasource.queryTimeAlignment Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true) -datasource.roundDigits int