Commit graph

6933 commits

Author SHA1 Message Date
Aliaksandr Valialkin
97e7eb1c13
deployment/docker/Makefile: upgrade Go builder from 1.22.3 to 1.22.4
See https://github.com/golang/go/issues?q=milestone%3AGo1.22.4+label%3ACherryPickApproved
2024-06-07 17:43:14 +02:00
pludov
7868587944
lib/fs: support NFS implementations that return EEXIST instead of ENOTEMPTY (#6398)
### Describe Your Changes

Fix for issue #6396: according to rmdir manpage, ENOTEMPTY and EEXIST
should be treated equally

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6396

### Checklist

The following checks are **mandatory**:

- [x ] My change adheres [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/contributing/).

---------

Co-authored-by: Ludovic Pollet <ludovic.pollet@exfo.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 3ddae77c63)
2024-06-04 15:43:17 +02:00
hagen1778
dd037ccb67
app/vmalert: rm extra response for unsupported path
Unsupported path is already handled by `lib/httpserver`.
This prevents from misleading errors in logs caused by double-writing response headers.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

(cherry picked from commit a5f81f67fd)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-06-03 12:58:58 +02:00
Roman Khavronenko
7f8db808fb
lib/storage: filter deleted label names and values from `/api/v1/labe… (#6342)
…ls` and `/api/v1/label/.../values`

Check for deleted metrics when `match[]` filter matches small number of
time series (optimized path).

The issue was introduced
[v1.81.0](https://docs.victoriametrics.com/changelog_2022/#v1810).

Related issue
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6300 Updates
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2978

Signed-off-by: hagen1778 <roman@victoriametrics.com>

(cherry picked from commit b984f4672e)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-05-29 15:22:18 +02:00
Alexander Marshalov
e5cbda3b2e
Update base Alpine image to 3.20.0 to avoid security risks (#6370)
fixes: CVE-2023-42366, CVE-2023-42363, CVE-2024-4603, CVE-2024-2511,
CVE-2024-24788, CVE-2024-24787

(cherry picked from commit a6cc7098fe)
2024-05-29 14:01:29 +02:00
viperstars
c74610017d
app/vmagent/remotewrite: skip sending empty block to downstream server (#6241)
Occasionally, vmagent sends empty blocks to downstream servers. If a
downstream server returns an unexpected response, vmagent gets stuck in
a retry loop. While vmagent handles 400 and 409 errors, there are
various prometheus remote write implementations that return different
error codes. For example, vector returns a 422 error. To mitigate the
risk of vmagent getting stuck in a retry loop, it is advisable to skip
sending empty blocks to downstream servers.

Co-authored-by: hao.peng <hao.peng@smartx.com>
Co-authored-by: Zhu Jiekun <jiekun.dev@gmail.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>

(cherry picked from commit 3661373cc2)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-05-17 15:34:26 +02:00
Yury Molodov
8fd4ee3cd2
vmui: fix calendar display (#6255)
Fix the calendar display issue occurring with the `UTC+00:00` timezone

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6239

(cherry picked from commit 4ad577cc6f)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-05-17 15:34:24 +02:00
Aliaksandr Valialkin
b3220a4b11
vendor: run make vendor-update 2024-05-12 16:26:38 +02:00
Aliaksandr Valialkin
91f55a94f3
Makefile: update Go version for go mod tidy from 1.21 to 1.22 2024-05-12 16:26:35 +02:00
Aliaksandr Valialkin
45770fabd5
app/vmselect/promql: properly estimate the needed amounts of memory for executing aggregate function over rollup function in incremental mode
Incremental aggregation processes only GOMAXPROCS time series at a time, so its' memory usage doesn't depend
on the number of input time series.

The issue has been introduced in 5138eaeea0

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3203
2024-05-12 10:18:52 +02:00
Zhu Jiekun
eee4ca6116
chore: [deployment] upgrade from go 1.22.2 to 1.22.3 to include security fixes (#6238)
### Describe Your Changes

upgrade from go 1.22.2 to 1.22.3 to include security fixes. Also see:
- https://go.dev/doc/devel/release
-
https://github.com/golang/go/issues?q=milestone%3AGo1.22.3+label%3ACherryPickApproved

### Checklist

The following checks are **mandatory**:

- [X] My change adheres [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/contributing/).

Signed-off-by: Jiekun <jiekun.dev@gmail.com>

(cherry picked from commit 02851d7800)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-05-10 14:53:26 +02:00
Aliaksandr Valialkin
8249acc69a
vendor: run make vendor-update 2024-04-19 11:53:20 +02:00
Aliaksandr Valialkin
cbb7df369b
docs/CHANGELOG.md: cut v1.93.14 LTS release 2024-04-19 11:53:18 +02:00
guangwu
5592af2471
app/vmctl: properly close file descriptor in verify-block action (#6106) 2024-04-17 09:48:51 +02:00
Alexander Marshalov
3c315a1c23
vmalert: support any status code from the range 200-299 from alertmanager as successful (#6111)
* any status code from the range 200-299 from alertmanager to vmalert is not considered an error from now on (#6110)

* add changelog
2024-04-17 09:42:53 +02:00
Aliaksandr Valialkin
f053b33e5d
vendor: run make vendor-update 2024-04-04 02:33:16 +03:00
Aliaksandr Valialkin
26725e9a5a
deployment: update Go builder from 1.22.1 to 1.22.2
See https://github.com/golang/go/issues?q=milestone%3AGo1.22.2+label%3ACherryPickApproved
2024-04-04 02:31:43 +03:00
Aliaksandr Valialkin
bcec92ae1f
app/vmui/Dockerfile-web: update alpine docker image from 3.19.0 to 3.19.1
This is a follow-up for fcc8b14f86
2024-04-04 02:30:37 +03:00
hagen1778
ebef0809d1
docs: follow-up after 623d257faf
623d257faf
Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 2e843a8ed9)
2024-03-29 14:56:58 +01:00
Jiekun
eb4b59613b
app/vmalert: respect batch size limit for remote write on shutdown (#6039)
During shutdown period of vmalert, remotewrite client retrieve all pending time series from buffer queue, compose them into 1 batch and execute remote write.

This final batch may exceed the limit of -remoteWrite.maxBatchSize, and be rejected by the receiver (gateway, vmcluster or others).

This changes ensures that even during shutdown vmalert won't exceed the max batch size limit for remote write
destination.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6025

(cherry picked from commit 623d257faf)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-03-29 14:56:58 +01:00
Hui Wang
617653309d
vmalert: fix sending alert messages (#6028)
* vmalert: fix sending alert messages
1. fix `endsAt` field in messages that send to alertmanager, previously rule with small interval could never be triggered;
2. fix behavior of `-rule.resendDelay`, before it could prevent sending firing message when rule state is volatile.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>

(cherry picked from commit d7224b2d1c)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-03-28 15:09:28 +01:00
Aliaksandr Valialkin
1568445944
deployment/docker: update Go builder from Go1.21.7 to Go1.22.1
See https://github.com/golang/go/issues?q=milestone%3AGo1.22.1+label%3ACherryPickApproved
2024-03-06 21:08:11 +02:00
Aliaksandr Valialkin
2c47204378
docs: consistently use https://docs.victoriametrics.com/lts-releases/ link for LTS releases 2024-03-01 02:57:48 +02:00
Aliaksandr Valialkin
9ab4d0fd13
docs/CHANGELOG.md: cut v1.93.13 LTS release 2024-03-01 01:59:16 +02:00
Aliaksandr Valialkin
fdec724c9e
vendor: run make vendor-update 2024-03-01 01:19:46 +02:00
Aliaksandr Valialkin
38dc127275
app/{vmagent,vminsert}: follow-up for 434a5803e7
Document the /opentelemetry/v1/metrics endpoint instead of /opentelemetry/api/v1/push,
since the /v1/metrics suffix is hardcoded in OpenTelemetry protocol specification.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5871
2024-02-29 18:10:40 +02:00
Nikolay
395c076b9f
app/{vmagent,vminsert}: adds /v1/metrics suffix for opentelemetry route path (#5871)
* app/{vmagent,vminsert}: adds /v1/metrics suffix for opentelemetry route path
it must fix compatibility with opentemetry-collector [spec](https://opentelemetry.io/docs/specs/otlp/\#otlphttp-request)
this suffix is hard-coded and cannot be changed with collector configuration

* Apply suggestions from code review

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2024-02-29 18:09:54 +02:00
Hui Wang
26d5054faf
metricsql: fix label_join() when dst_label is equal to one of the `… (#5886)
* metricsql: fix label_join() when `dst_label` is equal to one of the `src_label`

* Update app/vmselect/promql/transform.go

* Update docs/CHANGELOG.md

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2024-02-29 16:04:41 +02:00
Aliaksandr Valialkin
c432aba12f
deployment/docker: downgrade Go builder from 1.22.0 to 1.21.7
Go1.22.0 has the bug https://github.com/golang/go/issues/65705 ,
which prevents vmagent from normal operation.
2024-02-29 13:50:18 +02:00
Aliaksandr Valialkin
4530db76fd
docs/CHANGELOG.md: document d68bb658ce
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5833
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5834
2024-02-23 01:27:41 +02:00
Anton L
24154450e7
5833 Fix Deadlock when using shardByURL of VMAgent (#5834) 2024-02-23 01:25:29 +02:00
Alexander Marshalov
4b2ba16e27
[lib/httputils] fixed floating-point error when parsing time in RFC3339 format (#5814)
* [lib/promutils, lib/httputils] fixed floating-point error when parsing time in RFC3339 format (#5801)

* fixed tests

* fixed test

* Revert "fixed test"

This reverts commit 8a29764806.

* Revert "fixed tests"

This reverts commit 9ce13d1042.

* Revert "[lib/promutils, lib/httputils] fixed floating-point error when parsing time in RFC3339 format (#5801)"

This reverts commit a7a04bd4

* [lib/httputils] fixed floating-point error when parsing time in RFC3339 format (#5801)

---------

Co-authored-by: Nikolay <nik@victoriametrics.com>
2024-02-23 00:56:45 +02:00
hagen1778
76a82cd4e5
app/vmalert: consistently sort groups by name and filename on /groups page
This should prevent non-deterministic sorting for groups with identical names.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-02-23 00:32:13 +02:00
Aliaksandr Valialkin
11e0bc88a2
docs/CHANGELOG.md: document f8207e33a2 2024-02-17 17:59:11 +02:00
Alexander Marshalov
760d78bb58
lib/httputils: fixed error message for getting zero duration (#5795) (#5812) 2024-02-17 17:59:10 +02:00
Aliaksandr Valialkin
241f5800a1
vendor: run make vendor-update 2024-02-14 19:00:21 +02:00
Aliaksandr Valialkin
1ef66d8562
docs/CHANGELOG.md: cut v1.93.12 LTS release 2024-02-14 18:57:57 +02:00
Aliaksandr Valialkin
04e67b5933
Makefile: run go mod tidy with -compat=1.22 after 95222b2079 2024-02-12 22:50:51 +02:00
Aliaksandr Valialkin
f2ba311c80
all: upgrade Go builder from Go1.21.7 to Go1.22.0
See https://go.dev/doc/go1.22
2024-02-12 22:46:51 +02:00
Aliaksandr Valialkin
28b47c342a
lib/promscrape: go fmt after d918a7267d 2024-02-12 20:03:30 +02:00
Aliaksandr Valialkin
eb743677ad
lib/promscrape: fix TestGetStaticScrapeWorkSuccess test after ca67926952 2024-02-12 20:01:03 +02:00
Aliaksandr Valialkin
7e8b772426
lib/mergeset: do not panic on too long items passed to Table.AddItems()
Instead, log a sample of these long items once per 5 seconds into error log,
so users could notice and fix the issue with too long labels or too many labels.

Previously this panic could occur in production when ingesting samples with too long labels.
2024-02-12 20:01:02 +02:00
Aliaksandr Valialkin
a2a218e284
app/victoria-metrics: properly send staleness markers on victoriametrics shutdown if -selfScrapeInterval > 0
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/943
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1526
2024-02-08 15:51:50 +02:00
Aliaksandr Valialkin
b15efdc743
docs/CHANGELOG.md: clarify the bugfix description for e1bf8440eb 2024-02-08 13:02:55 +02:00
Aliaksandr Valialkin
054bff1f39
lib/mergeset: prevent from possible too big indexBlockSize panic
This panic could occur when samples with too long label values are ingested into VictoriaMetrics.
This could result in too long fistItem and commonPrefix values at blockHeader (up to 64kb each).
This may inflate the maximum index block size by 4 * maxIndexBlockSize.
2024-02-08 12:59:16 +02:00
Aliaksandr Valialkin
726751a311
app/vmselect/promql: properly handle precision errors in rollup functions
changes(), increases_over_time() and resets() shouldn't take into account
value changes, which may occur because of precision errors.

The maximum guaranteed precision for raw samples stored in VictoriaMetrics is 12 decimal digits.
So do not count relative changes for values if they are smaller than 1e-12 comparing to the value.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/767
2024-02-08 02:34:40 +02:00
Aliaksandr Valialkin
d5b9b56ae4
all: update Go builder from Go1.21.6 to Go1.21.7
See https://github.com/golang/go/issues?q=milestone%3AGo1.21.7+label%3ACherryPickApproved
2024-02-07 04:03:28 +02:00
Aliaksandr Valialkin
66f37935a3
lib/storage: move fixupTimestamps() call to Block.Init()
This is a follow-up for 0bf7921721
2024-02-06 22:45:29 +02:00
Zakhar Bessarab
517334f747
lib/storage/raw_row: properly initialize TS for tmp blocks (#5762)
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
2024-02-06 22:45:28 +02:00
Aliaksandr Valialkin
ae1b09e953
vendor: update github.com/VictoriaMetrics/metricsql from v0.70.0 to v0.70.1
This should help with the https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5604
2024-02-06 22:16:00 +02:00