Commit graph

1805 commits

Author SHA1 Message Date
Zakhar Bessarab
9937f2681e
lib/promrelabel: fix relabeling if clause (#4816)
* lib/promrelabel: fix relabeling if clause being applied to labels outside of current context

Relabeling is applied to each metric row separately, but in order to lower amount of memory allocations it is reusing labels.

Functions which are working on current metric row labels are supposed to use only current metric labels by using provided offset, but if clause matcher was using the whole labels set instead of local metrics.

This leaded to invalid relabeling results such as one described here: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4806

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* docs/CHANGELOG.md: document the bugfix

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1998
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4806

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-08-12 08:36:16 -07:00
Aliaksandr Valialkin
b4de063841
Upgrade Go builder from 1.20.4 to 1.21.0 2023-08-12 08:32:29 -07:00
Aliaksandr Valialkin
218974738e
deployment/docker/Makefile: upgrade base Docker image from alpine:3.18.2 to alpine:3.18.3
See https://alpinelinux.org/posts/Alpine-3.15.10-3.16.7-3.17.5-3.18.3-released.html
2023-08-12 08:25:29 -07:00
Roman Khavronenko
a8b846f109
docs: mention fix for https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4221 (#4382)
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4221

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

(cherry picked from commit 4b5faf7efb)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-06-05 11:26:51 +02:00
Roman Khavronenko
01393a112c
vmalert: fix API to return non-nil values (#4222)
Properly return empty slices instead of nil for `/api/v1/rules` and `/api/v1/alerts` API handlers.
This improves compatibility with Grafana.

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

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

(cherry picked from commit 3383f12a4b)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-06-05 11:23:16 +02:00
Roman Khavronenko
2831e6f9ae
vmalert: fix nil map assignment (#4392)
The storage instance with nil map params was created for remote-read purposes.
And before change 7a9ae9de0d this map was ignored in ApplyParams.
Now, it started to be used and vmalert panics in runtime.

The fix properly inits map for at `NewVMStorage` and verifies it is not nil
on assignment in `ApplyParams`.

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

---------

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

(cherry picked from commit de94812088)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-06-05 11:14:10 +02:00
Roman Khavronenko
6be9416f6d
vmalert: properly form assets address if httpPrefix set (#4351)
Properly form path to static assets in WEB UI
 if `http.pathPrefix` set.

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

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

(cherry picked from commit 51cea6cad4)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-06-05 11:07:44 +02:00
Aliaksandr Valialkin
668ff49682
docs/CHANGELOG.md: cut v1.79.13 2023-05-18 17:56:42 -07:00
Aliaksandr Valialkin
6e2782b5b7
deployment/docker: update base docker image from 3.17.3 to 3.18.0
See https://www.alpinelinux.org/posts/Alpine-3.18.0-released.html
2023-05-12 17:34:08 -07:00
Aliaksandr Valialkin
45ddfaa795
all: update Go builder from Go1.20.3 to Go1.20.4
See https://github.com/golang/go/issues?q=milestone%3AGo1.20.4+label%3ACherryPickApproved
2023-05-09 22:36:17 -07:00
Zakhar Bessarab
2c6fd59bed
lib/httpserver: add handler to serve /robots.txt and deny search indexing (#4143)
This handler will instruct search engines that indexing is not allowed for the content exposed to the internet. This should help to address issues like #4128 when instances are exposed to the internet without authentication.
2023-05-08 09:53:33 -07:00
Aliaksandr Valialkin
2df9d1e5fe
docs/CHANGELOG.md: cut v1.79.12 2023-04-06 01:14:19 -07:00
Aliaksandr Valialkin
630c411878
all: update Go builder from Go1.20.2 to Go1.20.3
See https://github.com/golang/go/issues?q=milestone%3AGo1.20.3+label%3ACherryPickApproved
2023-04-05 13:43:16 -07:00
Dmytro Kozlov
f160693c99
lib/promscrape: fix the problem with scrape work duplicates when file_sd_config can't be read (#4027)
* lib/promscrape: fix the problem with scrape work duplicates when file_sd_config can't be read

* lib/promscrape: clarified comment

* lib/promscrape: made better approach to handle a problem with growing []*ScrapeWork on each error when loading config

* lib/promscrape: added CHANGELOG.md

* Update docs/CHANGELOG.md

---------

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-04-02 21:15:42 -07:00
Roman Khavronenko
b04f5b7313
lib/storage: check for free disk space before opening tables (#4035)
* lib/storage: check for free disk space before opening tables

We check for free disk space before call to `openTable`,
so `Storage` can be set to ReadOnly before mergeWorkers start.

Before the change, there was a chance that merges will start
even if Storage has to start in ReadOnly mode because of
`-storage.minFreeDiskSpaceBytes` limit.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4023
Signed-off-by: hagen1778 <roman@victoriametrics.com>

* lib/storage: chore

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

* Update lib/storage/storage.go

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-04-01 00:33:36 -07:00
Aliaksandr Valialkin
2b03c570e2
deployment/docker: update base Docker image from Alpine 3.17.2 to Alpine 3.17.3
This fixes security issues from https://alpinelinux.org/posts/Alpine-3.17.3-released.html

This is a follow-up for 59c350d0d2
2023-03-31 22:51:00 -07:00
Zakhar Bessarab
58cb9ee92f
lib/fs: verify response code when reading configuration over HTTP (#4036)
Verifying status code helps to avoid misleading errors caused by attempt to parse unsuccessful response.

Related issue: #4034

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
2023-03-31 22:38:36 -07:00
Aliaksandr Valialkin
c96a79c0c4
docs/CHANGELOG.md: cut v1.79.11 2023-03-12 20:10:06 -07:00
Aliaksandr Valialkin
72de45f282
app/vmselect/promql: prevent from SIGBUS crash on architecures, which deny unaligned access to 8-byte words 2023-03-12 17:00:42 -07:00
Aliaksandr Valialkin
469168c53c
docs/CHANGELOG.md: document 113a89904d 2023-03-12 03:03:17 -07:00
Roman Khavronenko
af5091a79d
security: bump go version to 1.20.2 (#3935)
upgrade Go builder from Go1.20.1 to Go1.20.2
See the list of issues addressed in Go1.20.2 here (https://github.com/golang/go/issues?q=milestone%3AGo1.20.2+label%3ACherryPickApproved).

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-03-12 01:41:36 -08:00
Aliaksandr Valialkin
3b4819cc02
docs/CHANGELOG.md: document 927d9da270 2023-03-12 01:31:54 -08:00
Aliaksandr Valialkin
e9526e628d
docs/CHANGELOG.md: cut v1.79.10 2023-02-27 15:57:10 -08:00
Aliaksandr Valialkin
48ab2685de
docs/CHANGELOG.md: document the bugfix from 800be3d7d3 2023-02-27 15:53:09 -08:00
Aliaksandr Valialkin
706ed48482
docs/CHANGELOG.md: add missing message about LTS release for v1.79.9 2023-02-24 15:07:50 -08:00
Aliaksandr Valialkin
a5bc765b49
docs/CHANGELOG.md: cut v1.79.9 2023-02-24 13:56:46 -08:00
Aliaksandr Valialkin
35cf2fe3a3
all: update Go builder from Go1.20.0 to Go1.20.1
See https://github.com/golang/go/issues?q=milestone%3AGo1.20.1+label%3ACherryPickApproved
2023-02-14 23:10:40 -08:00
Aliaksandr Valialkin
3453bfe966
all: update alpine base docker image from 1.17.1 to 1.17.2
See https://alpinelinux.org/posts/Alpine-3.17.2-released.html
2023-02-14 22:56:44 -08:00
Aliaksandr Valialkin
a3f8b62964
docs/CHANGELOG.md: improve the docs for 8ea02eaa8e 2023-02-14 22:54:27 -08:00
Aliaksandr Valialkin
f2907b5d83
docs/CHANGELOG.md: cut v1.79.8 2023-02-03 18:45:28 -08:00
Zakhar Bessarab
6d684f8707
fix: vmselect multi-level setup panic (#3738)
* app/vmselect/netstorage: fix panic for multi-level cluster setup when `replicationFactor` was set and request contained `trace` parameter (#3734)

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vmselect/netstorage: use correct context for retry

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
2023-02-03 18:41:38 -08:00
Aliaksandr Valialkin
71347f6c17
docs/CHANGELOG.md: make the description for the bugfix from 465a285324 more reader-friendly 2023-01-27 15:07:06 -08:00
Nikolay
a7d67c932f
lib/storage: properly release parts inMerge lock (#3711)
if storage doesn't have enough disk space, finalDedupWatcher holds inMerge lock for all parts and never release it until storage restart
2023-01-27 15:06:23 -08:00
Roman Khavronenko
5d594f1f06
discover/ec2: follow-up after e2b4ab8384 (#3703)
Signed-off-by: hagen1778 <roman@victoriametrics.com>

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-01-27 15:02:41 -08:00
Zakhar Bessarab
6e398d12ef
lib/promscrape/discovery/dockerswarm: fix discovery filters being applied to all objects (#3632)
* lib/promscrape/discovery/dockerswarm: fix discovery filters being applied to all objects

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* Update docs/CHANGELOG.md

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-01-27 14:56:14 -08:00
Aliaksandr Valialkin
937fc1de11
docs/CHANGELOG.md: update the description of the change at 20f28eb9d6 2023-01-27 14:52:42 -08:00
Nikolay
0a787fca3e
/lib/promscrape: use correct err logger for scrape unmarshalling (#3645)
/lib/promscrape: use correct err logger for scrape unmarshalling
It correctly suppresses scrape errors and adds correct context for err msg
2023-01-27 14:51:33 -08:00
Aliaksandr Valialkin
46fe2885a1
vendor: update github.com/VictoriaMetrics/metricsql from v0.51.1 to v0.51.2
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3664
2023-01-27 14:31:00 -08:00
Aliaksandr Valialkin
95cd5e8345
docs/CHANGELOG.md: add a note that the 1.79.7 is LTS release 2023-01-10 21:19:45 -08:00
Aliaksandr Valialkin
b26b199c09
docs/CHANGELOG.md: cut v1.79.7 2023-01-10 20:06:25 -08:00
Aliaksandr Valialkin
1c0b471cac
vendor: update github.com/valyala/fastjson/fastfloat from v1.6.3 to v1.6.4
This should properly parse floating-point numbers with missing integer or fractional parts.
For example, 123. or .123

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3544
2023-01-10 19:48:25 -08:00
Aliaksandr Valialkin
cec68ff98c
vendor: update github.com/VictoriaMetrics/metricsql from v0.50.0 to v0.51.0
Updates https://github.com/VictoriaMetrics/metricsql/pull/7
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3589
2023-01-10 19:46:07 -08:00
Zakhar Bessarab
77450c715a
lib/promscrape/discovery/dockerswarm: fix query encoding of filters (#3586)
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-01-10 19:41:11 -08:00
Aliaksandr Valialkin
9f66f84aef
lib/flagutil/bytes.go: properly handle values bigger than 2GiB on 32-bit architectures
This fixes handling of values bigger than 2GiB for the following command-line flags:

- -storage.minFreeDiskSpaceBytes
- -remoteWrite.maxDiskUsagePerURL
2023-01-10 19:36:14 -08:00
Aliaksandr Valialkin
911ed19696
docs/CHANGELOG.md: consistently use YYYY-MM-DD format for release dates
The previously used DD-MM-YYYY format could be confused with the MM-DD-YYYY format.
The YYYY-MM-DD format reduces this confusion.
2022-12-20 12:50:47 -08:00
Aliaksandr Valialkin
89093e03e8
docs/CHANGELOG.md: document the change at 547f07463b29c09c62c9af35eac9cee6764b3286
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2612
2022-12-20 12:46:15 -08:00
Aliaksandr Valialkin
f5781f5b4f
lib/protoparser/datadog: do not re-use previously parsed field values if they are missing in the currently parsed message
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3432
2022-12-20 12:41:12 -08:00
Aliaksandr Valialkin
27b2c85e53
docs/CHANGELOG.md: add a note to v1.79.6 that the v1.79.x is a line of LTS releases 2022-12-11 01:49:58 -08:00
Aliaksandr Valialkin
b6dd6d9aeb
docs/CHANGELOG.md: cut v1.79.6 2022-12-11 00:34:15 -08:00
Aliaksandr Valialkin
58fba96943
all: update Go builder from v1.19.3 to v1.19.4
See https://github.com/golang/go/issues?q=milestone%3AGo1.19.4+label%3ACherryPickApproved
2022-12-11 00:23:55 -08:00