From 8f6af6df9fba688179fe468d19c061498d1468a4 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 20 May 2024 04:48:34 +0200 Subject: [PATCH 1/3] docs/VictoriaLogs: typo fixes --- docs/VictoriaLogs/CHANGELOG.md | 4 ++-- docs/VictoriaLogs/LogsQL.md | 4 ++-- docs/VictoriaLogs/querying/README.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/VictoriaLogs/CHANGELOG.md b/docs/VictoriaLogs/CHANGELOG.md index 3570854c1..d8412653e 100644 --- a/docs/VictoriaLogs/CHANGELOG.md +++ b/docs/VictoriaLogs/CHANGELOG.md @@ -25,7 +25,7 @@ Released at 2024-05-20 * FEATURE: add ability to extract JSON fields from [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). See [these docs](https://docs.victoriametrics.com/victorialogs/logsql/#unpack_json-pipe). * FEATURE: add ability to extract [logfmt](https://brandur.org/logfmt) fields from [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model). See [these docs](https://docs.victoriametrics.com/victorialogs/logsql/#unpack_logfmt-pipe). -* FEATURE: add ability to extract arbitrary text from [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) into the output fields. See [these docs](https://docs.victoriametrics.com/victorialogs/logsql/#extact-pipe). +* FEATURE: add ability to extract arbitrary text from [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) into the output fields. See [these docs](https://docs.victoriametrics.com/victorialogs/logsql/#extract-pipe). * FEATURE: add ability to put arbitrary [queries](https://docs.victoriametrics.com/victorialogs/logsql/#query-syntax) inside [`in()` filter](https://docs.victoriametrics.com/victorialogs/logsql/#multi-exact-filter). * FEATURE: add support for post-filtering of query results with [`filter` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#filter-pipe). * FEATURE: allow applying individual [filters](https://docs.victoriametrics.com/victorialogs/logsql/#filters) per each [stats function](https://docs.victoriametrics.com/victorialogs/logsql/#stats-pipe-functions). See [these docs](https://docs.victoriametrics.com/victorialogs/logsql/#stats-with-additional-filters). @@ -36,7 +36,7 @@ Released at 2024-05-20 * FEATURE: add `/select/logsql/field_names` HTTP endpoint for returning [field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) names from results of the given query. See [these docs](https://docs.victoriametrics.com/victorialogs/querying/#querying-field-names) for details. * FEATURE: add `/select/logsql/field_values` HTTP endpoint for returning unique values for the given [field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) obtained from results of the given query. See [these docs](https://docs.victoriametrics.com/victorialogs/querying/#querying-field-values) for details. -* BUGFIX: properly take into account `offset` [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe) when it already has `limit`. For example, `_time:5m | sort by (foo) offset 20 limit 10`. +* BUGFIX: properly take into account `offset` at [`sort` pipe](https://docs.victoriametrics.com/victorialogs/logsql/#sort-pipe) when it already has `limit`. For example, `_time:5m | sort by (foo) offset 20 limit 10`. ## [v0.7.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v0.7.0-victorialogs) diff --git a/docs/VictoriaLogs/LogsQL.md b/docs/VictoriaLogs/LogsQL.md index 6d95ed6f2..d9d6ad219 100644 --- a/docs/VictoriaLogs/LogsQL.md +++ b/docs/VictoriaLogs/LogsQL.md @@ -1578,7 +1578,7 @@ Performance tip: if you need extracting a single field from long JSON, it is fas stored in [`_msg` field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field): ``` -_time:5m | extract '"ip":' +_time:5m | extract '"ip":' ``` See also: @@ -1619,7 +1619,7 @@ For example, the following query extracts `"ip"` field from [logfmt](https://bra in [`_msg` field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field): ``` -_time:5m | extract ' ip=' +_time:5m | extract ' ip=' ``` See also: diff --git a/docs/VictoriaLogs/querying/README.md b/docs/VictoriaLogs/querying/README.md index f2d332b15..42f45b487 100644 --- a/docs/VictoriaLogs/querying/README.md +++ b/docs/VictoriaLogs/querying/README.md @@ -102,7 +102,7 @@ The `` arg can contain values in [the format specified here](https://docs. If `` is missing, then it equals to `1d` (one day). For example, the following command returns per-hour number of [log messages](https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field) -with the `error` [word](https://docs.victoriametrics.com/victorialogs/logsql/#word) over logs for the 3 hours: +with the `error` [word](https://docs.victoriametrics.com/victorialogs/logsql/#word) over logs for the last 3 hours: ```sh curl http://localhost:9428/select/logsql/hits -d 'query=error' -d 'start=3h' -d 'step=1h' @@ -195,7 +195,7 @@ See also: ### Querying field names VictoriaLogs provides `/select/logsql/field_names?query=&start=&end=` HTTP endpoint, which returns field names -from result of the given `` [LogsQL query](https://docs.victoriametrics.com/victorialogs/logsql/) on the given `[ ... ]` time range. +from results of the given `` [LogsQL query](https://docs.victoriametrics.com/victorialogs/logsql/) on the given `[ ... ]` time range. The `` and `` args can contain values in [any supported format](https://docs.victoriametrics.com/#timestamp-formats). If `` is missing, then it equals to the minimum timestamp across logs stored in VictoriaLogs. @@ -239,7 +239,7 @@ The `` and `` args can contain values in [any supported format](http If `` is missing, then it equals to the minimum timestamp across logs stored in VictoriaLogs. If `` is missing, then it equals to the maximum timestamp across logs stored in VictoriaLogs. -For example, the following command returns unique the values for `host` [field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) +For example, the following command returns unique values for `host` [field](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) across logs with the `error` [word](https://docs.victoriametrics.com/victorialogs/logsql/#word) for the last 5 minutes: ```sh From 7a6783e3dfa93644515619391472b6d8d5b380fb Mon Sep 17 00:00:00 2001 From: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com> Date: Mon, 20 May 2024 16:08:27 +0800 Subject: [PATCH 2/3] Automatic update operator docs from VictoriaMetrics/operator@c8534a5 (#6305) --- docs/operator/CHANGELOG.md | 2 ++ docs/operator/vars.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/operator/CHANGELOG.md b/docs/operator/CHANGELOG.md index 6829ecaa1..a807ac66a 100644 --- a/docs/operator/CHANGELOG.md +++ b/docs/operator/CHANGELOG.md @@ -16,6 +16,8 @@ aliases: ## Next release +- [vmalertmanager](./api.md#vmalertmanager): ignores content of `cr.spec.configSecret` if it's name clashes with secret used by operator for storing alertmanager config. See this [issue](https://github.com/VictoriaMetrics/operator/issues/954) for details. + ## [v0.44.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.44.0) - 9 May 2024 - [vmagent](./api.md#vmagent): adds new fields into `streamAggrConfig`: `dedup_interval`, `ignore_old_samples`, `keep_metric_names`, `no_align_flush_to_interval`. It's only possible to use it with v1.100+ version of `vmagent`. See this [issue](https://github.com/VictoriaMetrics/operator/issues/936) for details. diff --git a/docs/operator/vars.md b/docs/operator/vars.md index b36cccee2..2bd298fd0 100644 --- a/docs/operator/vars.md +++ b/docs/operator/vars.md @@ -10,7 +10,7 @@ menu: # Auto Generated vars for package config - updated at Thu May 9 16:51:28 UTC 2024 + updated at Mon May 20 07:54:43 UTC 2024 | varible name | variable default value | variable required | variable description | From bc4a0b8f37357e0af29702d0bf520452d857f038 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 20 May 2024 11:04:01 +0200 Subject: [PATCH 3/3] lib/logstorage: fix golangci-lint warnings --- lib/logstorage/bitmap_timing_test.go | 4 ++-- lib/logstorage/storage_search.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/logstorage/bitmap_timing_test.go b/lib/logstorage/bitmap_timing_test.go index 1665d9050..9f364290e 100644 --- a/lib/logstorage/bitmap_timing_test.go +++ b/lib/logstorage/bitmap_timing_test.go @@ -94,7 +94,7 @@ func benchmarkBitmapForEachSetBitReadonly(b *testing.B, bm *bitmap) { n := 0 for pb.Next() { bmLocal.copyFrom(bm) - bmLocal.forEachSetBitReadonly(func(idx int) { + bmLocal.forEachSetBitReadonly(func(_ int) { n++ }) } @@ -111,7 +111,7 @@ func benchmarkBitmapForEachSetBit(b *testing.B, bm *bitmap, isClearBits bool) { n := 0 for pb.Next() { bmLocal.copyFrom(bm) - bmLocal.forEachSetBit(func(idx int) bool { + bmLocal.forEachSetBit(func(_ int) bool { n++ return !isClearBits }) diff --git a/lib/logstorage/storage_search.go b/lib/logstorage/storage_search.go index ce74afd39..894c738f2 100644 --- a/lib/logstorage/storage_search.go +++ b/lib/logstorage/storage_search.go @@ -206,7 +206,7 @@ func endsWithPipeUniqSingleField(pipes []pipe, fieldName string) bool { func (s *Storage) runSingleColumnQuery(ctx context.Context, tenantIDs []TenantID, q *Query) ([]string, error) { var values []string var valuesLock sync.Mutex - writeBlockResult := func(workerID uint, br *blockResult) { + writeBlockResult := func(_ uint, br *blockResult) { if len(br.timestamps) == 0 { return }