Commit graph

6950 commits

Author SHA1 Message Date
Aliaksandr Valialkin
93a14457e0
docs/CHANGELOG.md: cut v1.93.16 2024-07-17 18:58:04 +02:00
Zhu Jiekun
a6c645fed7
vmalert: [bug] fixed System hyperlink 404 redirect (#6620)
### Describe Your Changes

As mentioned in https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6603, some hyperlinks under `vmalert` -> `System`
section is not working as expected.

Pages and redirection:
- For page `http://127.0.0.1:8880/`: `flags` button will redirect to
`http://127.0.0.1:8880/flags`
- For page `http://127.0.0.1:8880/vmalert`:
`http://127.0.0.1:8880/flags`
- For page `http://127.0.0.1:8880/vmalert/`:
`http://127.0.0.1:8880/vmalert/flags` (page not exists)
- Similar redirection could be observed with `-http.pathPrefix`

Two potential ways to avoid 404 redirection:
1. **avoid visiting `/vmalert/`** (I'm trying to do this).
2. provide support for `/vmalert/flags`.

`/vmalert/` could be visit only when user click other navigator (e.g.
Group) and click vmalert again:
![Peek 2024-07-10
10-07](https://github.com/VictoriaMetrics/VictoriaMetrics/assets/30280396/13d7b147-a1b6-4e93-9ee0-26f881a16bef)
Because: `http://127.0.0.1:8880/vmalert/groups?search=` + `<a
class="nav-link" href=".">` = `http://127.0.0.1:8880/vmalert/`

So I'm trying to change the `href="."` to `href="../vmalert"`.

### Checklist

The following checks are **mandatory**:

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

(cherry picked from commit cadf1eb5ab)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-07-11 12:45:46 +02:00
Zakhar Bessarab
e64dff8369
app/vmselect/promql: propagate lower bucket values when fixing a histogram (#6547)
### Describe Your Changes

In most cases histograms are exposed in sorted manner with lower buckets
being first. This means that during scraping buckets with lower bounds
have higher chance of being updated earlier than upper ones.

Previously, values were propagated from upper to lower bounds, which
means that in most cases that would produce results higher than expected
once all buckets will become updated.
Propagating from upper bound effectively limits highest value of
histogram to the value of previous scrape. Once the data will become
consistent in the subsequent evaluation this causes spikes in the
result.

Changing propagation to be from lower to higher buckets reduces value
spikes in most cases due to nature of the original inconsistency.

 See: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4580

An example histogram with previous(red) and updated(blue) versions:

![1719565540](https://github.com/VictoriaMetrics/VictoriaMetrics/assets/1367798/605c5e60-6abe-45b5-89b2-d470b60127b8)

This also makes logic of filling nan values with lower buckets values: [1 2 3 nan nan nan] => [1 2 3 3 3 3] obsolete.
Since buckets are now fixed from lower ones to upper this happens in the main loop, so there is no need in a second one.

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Andrii Chubatiuk <andrew.chubatiuk@gmail.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>

(cherry picked from commit 6a4bd5049b)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-07-10 15:22:24 +02:00
Hui Wang
f0b8d68f70
security: upgrade base docker image (Alpine) from 3.20.0 to 3.20.1
See https://www.alpinelinux.org/posts/Alpine-3.20.1-released.html

>including security fixes for:
OPENSSL
[CVE-2024-4741](https://security.alpinelinux.org/vuln/CVE-2024-4741)
BUSYBOX
[CVE-2023-42364](https://security.alpinelinux.org/vuln/CVE-2023-42364)
[CVE-2023-42365](https://security.alpinelinux.org/vuln/CVE-2023-42365)

(cherry picked from commit 8e9f98e725)
2024-07-09 11:48:06 +02:00
Aliaksandr Valialkin
14a6e6734f
deployment/docker: update Go builder from Go1.22.4 to Go1.22.5
See https://github.com/golang/go/issues?q=milestone%3AGo1.22.5+label%3ACherryPickApproved

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-07-09 11:48:03 +02:00
jackyin
f4bbf2ee13
app/vmui: copy button shows undefined (#6495)
### Describe Your Changes
fix #6421
some aggregation func don't return \_\_name\_\_ value

(cherry picked from commit 65f414acee)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-06-18 14:27:33 +02:00
jackyin
dc41a36712
app/vmalert: fix VMAlert oauth2 error (#6478)
Properly set ClientSecret param for notifier.

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

---------

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

(cherry picked from commit 5223981fed)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-06-14 15:35:10 +02:00
hagen1778
725b56bc53
app/vmalert: properly configure authentication with S3 when -s3.configFilePath is specified.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit de07589bf1)
2024-06-14 15:34:39 +02:00
Andrii Chubatiuk
6970b546bd
lib/backup/s3remote: fixed credsFilePath flag (#6488)
properly use credsFilePath flag value

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

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit e678a9aa51)
2024-06-14 15:34:29 +02:00
Andrii Chubatiuk
8828c9de22
app/vmalert: fixed path prefixes for system routes (#6435)
Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6433

---------

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

(cherry picked from commit eea361defb)
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2024-06-14 15:34:25 +02:00
Aliaksandr Valialkin
4f87f83fee
docs/CHANGELOG.md: cut v1.93.15 LTS release 2024-06-07 20:37:27 +02:00
Aliaksandr Valialkin
711dc21a6e
vendor: run make vendor-update 2024-06-07 18:37:39 +02:00
Aliaksandr Valialkin
a1e0714c38
lib,app: make golangc-lint happy 2024-06-07 18:36:57 +02:00
Denys Holius
e6a47d2b67
Makefile: bump version of golangci-lint to the latest v1.57.1 (#6001)
Co-authored-by: Roman Khavronenko <roman@victoriametrics.com>
2024-06-07 17:51:23 +02:00
Aliaksandr Valialkin
e43b15eab4
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:42:59 +02:00
pludov
f8fbd4c116
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:03 +02:00
hagen1778
c04880909b
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:17 +02:00
Roman Khavronenko
8665807fd9
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:19:41 +02:00
Alexander Marshalov
44538b35a1
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:02 +02:00
viperstars
b2c0cd2c64
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:32:02 +02:00
Yury Molodov
9aa0eb434e
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:30:42 +02:00
Aliaksandr Valialkin
6d73e6f598
vendor: run make vendor-update 2024-05-12 16:26:09 +02:00
Aliaksandr Valialkin
64a0fc63f5
Makefile: update Go version for go mod tidy from 1.21 to 1.22 2024-05-12 16:25:32 +02:00
Aliaksandr Valialkin
d856b598a8
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:22 +02:00
Zhu Jiekun
e8fb7cdb70
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:06 +02:00
Aliaksandr Valialkin
345a53d8b0
vendor: run make vendor-update 2024-04-19 11:53:04 +02:00
Aliaksandr Valialkin
bbf496ebc7
docs/CHANGELOG.md: cut v1.93.14 LTS release 2024-04-19 11:50:35 +02:00
guangwu
c1f00eceaf
app/vmctl: properly close file descriptor in verify-block action (#6106) 2024-04-17 09:48:21 +02:00
Alexander Marshalov
b8190dd68c
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:39 +02:00
Aliaksandr Valialkin
a6da76730a
vendor: run make vendor-update 2024-04-04 02:32:56 +03:00
Aliaksandr Valialkin
0167dbe4d9
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:33 +03:00
Aliaksandr Valialkin
9b681ea2c6
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:31 +03:00
hagen1778
2a09a3ea91
docs: follow-up after 623d257faf
623d257faf
Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 2e843a8ed9)
2024-03-29 14:56:35 +01:00
Jiekun
88985e6315
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:30 +01:00
Hui Wang
a1f3207e93
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:08:31 +01:00
Aliaksandr Valialkin
405d2c30d4
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:07:47 +02:00
Aliaksandr Valialkin
4dc3a0c736
docs: consistently use https://docs.victoriametrics.com/lts-releases/ link for LTS releases 2024-03-01 02:57:39 +02:00
Aliaksandr Valialkin
26266a4639
docs/CHANGELOG.md: cut v1.93.13 LTS release 2024-03-01 01:59:02 +02:00
Aliaksandr Valialkin
5827ff7e30
vendor: run make vendor-update 2024-03-01 01:19:32 +02:00
Aliaksandr Valialkin
3061790d85
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:09:15 +02:00
Nikolay
003d1fecd6
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:08:34 +02:00
Hui Wang
3bb36bb510
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:31 +02:00
Aliaksandr Valialkin
1258c22881
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:49:12 +02:00
Aliaksandr Valialkin
196b5ffa65
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:28 +02:00
Anton L
11fb95f25b
5833 Fix Deadlock when using shardByURL of VMAgent (#5834) 2024-02-23 01:25:08 +02:00
Alexander Marshalov
708551399c
[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:37 +02:00
hagen1778
5f028e54b5
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:30:23 +02:00
Aliaksandr Valialkin
83cf46719e
docs/CHANGELOG.md: document f8207e33a2 2024-02-17 17:59:01 +02:00
Alexander Marshalov
1cb512fd0a
lib/httputils: fixed error message for getting zero duration (#5795) (#5812) 2024-02-17 17:57:39 +02:00
Aliaksandr Valialkin
cf60be4a0b
vendor: run make vendor-update 2024-02-14 19:00:11 +02:00