From 15c63589b4489a4e62dac8d802e858194eaf04a8 Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 6 Mar 2024 18:52:56 +0000 Subject: [PATCH] update wiki pages --- CHANGELOG.md | 1 + operator/CHANGELOG.md | 7 +++++++ operator/vars.md | 2 +- vmauth.md | 22 ++++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ae996c..81eeeaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). ## tip +* FEATURE: [vmauth](https://docs.victoriametrics.com/vmauth/): allow routing incoming requests bassed on HTTP [query args](https://en.wikipedia.org/wiki/Query_string) via `src_query_args` option at `url_map`. See [these docs](https://docs.victoriametrics.com/vmauth/#generic-http-proxy-for-different-backends) and [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5878). * FEATURE: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): reduce memory usage by up to 5x when aggregating over big number of unique [time series](https://docs.victoriametrics.com/keyconcepts/#time-series). The memory usage reduction is most visible when [stream deduplication](https://docs.victoriametrics.com/stream-aggregation/#deduplication) is enabled. The downside is increased CPU usage by up to 30%. * FEATURE: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): allow using `-streamAggr.dedupInterval` and `-remoteWrite.streamAggr.dedupInterval` command-line flags without the need to specify `-streamAggr.config` and `-remoteWrite.streamAggr.config`. See [these docs](https://docs.victoriametrics.com/stream-aggregation/#deduplication). * FEATURE: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): add `-streamAggr.dropInputLabels` command-line flag, which can be used for dropping the listed labels from input samples before applying stream [de-duplication](https://docs.victoriametrics.com/stream-aggregation/#deduplication) and aggregation. This is faster and easier to use alternative to [input_relabel_configs](https://docs.victoriametrics.com/stream-aggregation/#relabeling). See [these docs](https://docs.victoriametrics.com/stream-aggregation/#dropping-unneeded-labels). diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index c1c7efe..7cb67ba 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -16,6 +16,13 @@ aliases: ## Next release + +## [v0.42.](https://github.com/VictoriaMetrics/operator/releases/tag/v0.42.2) - 6 Mar 2024 + +- [operator](./README.md): fixes alertmanager args typo. +- [prometheus-converter](./README.md): adds new flag `controller.prometheusCRD.resyncPeriod` which allows to configure resync period of prometheus CRD objects. See this [issue](https://github.com/VictoriaMetrics/operator/issues/869) for details. + + ## [v0.42.](https://github.com/VictoriaMetrics/operator/releases/tag/v0.42.1) - 5 Mar 2024 diff --git a/operator/vars.md b/operator/vars.md index 2cbcd78..2e46d1f 100644 --- a/operator/vars.md +++ b/operator/vars.md @@ -10,7 +10,7 @@ menu: # Auto Generated vars for package config - updated at Tue Mar 5 15:17:26 UTC 2024 + updated at Wed Mar 6 00:47:16 UTC 2024 | varible name | variable default value | variable required | variable description | diff --git a/vmauth.md b/vmauth.md index 6878f17..40416fa 100644 --- a/vmauth.md +++ b/vmauth.md @@ -117,6 +117,28 @@ if the whole request path matches at least one `src_paths` entry. The incoming r If both `src_paths` and `src_hosts` lists are specified, then the request is routed to the given `url_prefix` when both request path and request host match at least one entry in the corresponding lists. +An optional `src_query_args` can be used for routing requests based on [HTTP query args](https://en.wikipedia.org/wiki/Query_string) additionaly to hostname and path. +For example, the following config routes requests to `http://app1-backend/` if `db=foo` query arg is present in the request, +while routing requests with `db=bar` query arg to `http://app2-backend`: + +```yaml +unauthorized_user: + url_map: + - src_query_args: + - name: db + value: foo + url_prefix: "http://app1-backend/" + - src_query_args: + - name: db + value: bar + url_prefix: "http://app2-backend/" +``` + +If `src_query_args` contains multiple entries, then it is enough to match only a single entry in order to route the request to the given `url_prefix`. + +If `src_hosts` and/or `src_paths` are specified together with `src_query_args`, then the request is routed to the given `url_prefix` if its host, path and query args +match the given lists simultaneously. + ### Generic HTTP load balancer `vmauth` can balance load among multiple HTTP backends in least-loaded round-robin mode.