Commit Graph

6927 Commits

Author SHA1 Message Date
Max Kotliar
5f2bde301b Merge remote-tracking branch 'opensource/master' into vmagent-drain-in-memory-queue 2026-05-13 16:00:27 +03:00
Roman Khavronenko
5f5a2109e8 docs: structurize multitenancy doc for vmagent (#10943)
This change should clearly distinguish different multitnenacy scenarios
for vmagent. It is expected to be easier to read and follow for users.

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Pablo Fernandez <46322567+TomFern@users.noreply.github.com>
2026-05-13 13:07:33 +02:00
June
b20ffeb12d app/{vmalert,vmagent}: add basicAuth.usernameFile CLI flags
The core `lib/promauth` already supports `usernameFile`
configs, but the CLI flags for vmagent remotewrite and vmalert
datasource/remotewrite/remoteread/notifier only expose
`basicAuth.username`.

This commit adds the corresponding `basicAuth.usernameFile` flags to match
the existing `basicAuth.passwordFile` pattern, closing the gap between
YAML and CLI configuration.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9436
2026-05-12 22:50:44 +02:00
Zhu Jiekun
3d3cc4bceb lib/memory: adds memory.allowedBytes warning message
This commit adds a warning message, if `-memory.allowedBytes` has value less than 1MB.

 It should help to debug possible issues, if there is a problem with app start-up due to low memory limit.

 For example, fastcache could panic at `-memory.allowedBytes=`

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10935
2026-05-12 22:31:23 +02:00
Hui Wang
2d33493009 app/vmalert: support sending data to -remoteWrite.url via zstd
In most cases, vmalert is configured to write to vm components like
vminsert or vmagent, using VictoriaMetrics remote write protocol can
save network bandwidth.
The VictoriaMetrics remote write protocol is used by default, and the
protocol is downgraded from VictoriaMetrics to Prometheus remote write
if one request fails with protocol error.

Related PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10929
2026-05-12 22:19:29 +02:00
Max Kotliar
71716e7201 docs: use git worktrees instead of checkout for updating flags in docs
Replace the pattern of `git checkout <tag> && make <binary>` with `git
worktree add /tmp/vm-* <tag>` so that flag updates no longer switch the
working tree of the current repository. Each variant (opensource,
enterprise, cluster) gets its own worktree, removing the need to restore
the original branch between steps.

Also normalize dynamic default values in vmctl prometheus flags
(-prom-tmp-dir-path) to `os.TempDir()` to reduce noisy diffs caused by
machine-specific temp paths.
2026-05-12 19:39:35 +03:00
Max Kotliar
f8a430b2c5 app/vmui: improve Top Queries table UX (#10790)
- Add tooltip support to column headers with info icons, explaining what
each column is for.
- Format duration columns using humanizeSeconds instead of raw seconds
- Format memory column with human-readable units (B/KB/MB/GB/TB)
- Shorten column titles ("sum duration, sec" → "duration", "query time
interval" → "range", "avg memory usage, bytes" → "memory")
- Show "instant" for queries with no time range instead of empty value

Before:
<img width="1512" height="863" alt="Screenshot 2026-05-11 at 21 28 49"
src="https://github.com/user-attachments/assets/4e4dc67c-d121-4ecc-974f-3e1e9e28f3b7"
/>

After:
<img width="1512" height="862" alt="Screenshot 2026-05-11 at 21 28 21"
src="https://github.com/user-attachments/assets/89b21e58-a2c4-44d4-8806-a72e9f1555f3"
/>

PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10790

---------

Signed-off-by: Yury Molodov <yurymolodov@gmail.com>
Co-authored-by: Yury Moladau <yurymolodov@gmail.com>
2026-05-12 18:57:45 +03:00
Uğur Tafralı
475675b16c lib/backup/fslocal: remove traling slash in provided directory (#10825)
Trailing slash in -storageDataPath was causing vmrestore to panic. The fix calls filepath.Clean() in Init() to normalize the path. Added a test to verify ListParts works correctly with a trailing slash.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10823
PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10825

---------

Signed-off-by: JAYICE <jayice.zhou@qq.com>
Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-05-12 18:11:47 +03:00
Max Kotliar
ff7ef5f435 docs: rename invalid -snapshot.createUrl flag to -snapshot.createURL
I copy pasted the flag from the doc and it did not work. Turned out that
the flag has to be -snaphsot.createURL.
2026-05-12 18:08:44 +03:00
Max Kotliar
d3c830fbcf Merge remote-tracking branch 'opensource/master' into vmagent-drain-in-memory-queue 2026-05-12 15:56:04 +03:00
Max Kotliar
243037823a app/vmagent: fix rare hash collision in getLabelsHash (#10937)
Add '=' separator between label name and value when computing the hash
to prevent false collisions, like {a="bc"} and {ab="c"} hashing to the
same value.

getLabelsHashForShard is added to avoid sharding disruptions in vmagent
(-remoteWrite.shardByURL=true mode). The function preserves previous
behavior, without '=' between name and value.

PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10937
2026-05-12 15:42:55 +03:00
andriibeee
85e0253569 lib/protoparser: add flag to allow OpenTelemetry underscore labels to pass through without being prefixed (#10475)
Add `-opentelemetry.labelNameUnderscoreSanitization` command-line flag to control whether to enable prepending of `key` to labels starting with `_` when `-opentelemetry.usePrometheusNaming` is enabled. The labels starting with `__` are not modified.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9663

Signed-off-by: andriibeee <154226341+andriibeee@users.noreply.github.com>
Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-05-12 15:17:36 +03:00
Max Kotliar
7214ca1a8b app/vmagent: attempt to send in memory blocks to rw during shutdown
vmagent would try to flush in-memory blocks to rw for 5 seconds only
after falling back and store them to the persisted queue

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9996
2026-05-11 21:04:35 +03:00
Max Kotliar
17c95e59e3 docs/vmauth: use canonical link 2026-05-11 14:45:27 +03:00
Andrii Chubatiuk
e7c46a0f4c lib/streamaggr: use max samples lag for flush delay calculation (#10835)
### Describe Your Changes

fixes #10402

use max sample lag for flush delay calculation when aggregation windows
enabled. before 95th percentile of samples lag was used, which led to
dropped data

### Checklist

The following checks are **mandatory**:

- [ ] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).
- [ ] My change adheres to [VictoriaMetrics development
goals](https://docs.victoriametrics.com/victoriametrics/goals/).

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
2026-05-11 13:21:20 +02:00
Alexei Margasov
20d4314168 lib/streamaggr: fix stale quantiles output (#10918)
### Describe Your Changes

Fix stale `quantiles(...)` stream aggregation output for series without
samples in the current aggregation interval.

Previously, `quantilesAggrConfig` reused the `quantiles` buffer across
aggregation values. If `quantilesAggrValue.flush` was called for a
series without samples after another series had already calculated
quantiles, the stale quantile
values could be emitted for the empty series.

This could produce unrealistic `*_quantiles` output values and make the
same aggregated value appear across unrelated labelsets.

The PR skips `quantiles(...)` output when there is no histogram for the
current interval and adds a regression test for this case.

### Checklist

The following checks are **mandatory**:

- [x] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).
- [x] My change adheres to [VictoriaMetrics development
goals](https://docs.victoriametrics.com/victoriametrics/goals/).

---------

Co-authored-by: hagen1778 <roman@victoriametrics.com>
2026-05-11 13:12:23 +02:00
f41gh7
45177e2683 docs: update flags with actual v1.143.0 binaries
Signed-off-by: f41gh7 <nik@victoriametrics.com>
2026-05-11 11:21:51 +02:00
f41gh7
e2403a5988 docs: bump version to v1.143.0
Signed-off-by: f41gh7 <nik@victoriametrics.com>
2026-05-11 11:20:09 +02:00
f41gh7
bfbfd37b69 docs: forward port LTS v1.122.22 changelog to upstream
Signed-off-by: f41gh7 <nik@victoriametrics.com>
2026-05-11 11:14:29 +02:00
f41gh7
f467be8b64 docs: forward port LTS v1.136.9 changelog to upstream
Signed-off-by: f41gh7 <nik@victoriametrics.com>
2026-05-11 11:13:51 +02:00
f41gh7
5e9324673e docs/changelog: cut release v1.143.0
Signed-off-by: f41gh7 <nik@victoriametrics.com>
2026-05-08 13:46:00 +02:00
f41gh7
9c5ac6b05f docs: update version to v1.143.0
Signed-off-by: f41gh7 <nik@victoriametrics.com>
2026-05-08 13:45:15 +02:00
Nikolay
87e59a4bbf app/vmselect/searchutil: prioritize URL query params over form values
When a request contains both URL path query params and POST form values
for extra_label and extra_filters[], URL query params now take
precedence. This resolves the conflict between the two sources and
simplifies security enforcement for extra_label/extra_filters policies
via vmauth or any other http proxy.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10908
2026-05-08 10:11:58 +02:00
Max Kotliar
64f6c7e300 docs/integrations: add available_from placeholder for native histogram feature
Follow up on
76e0bcdf45
2026-05-08 10:57:05 +03:00
f41gh7
27f81ebf1d deployment/docker: update Go builder from Go1.26.2 to Go1.26.3
See https://github.com/golang/go/issues?q=milestone%3AGo1.26.3%20label%3ACherryPickApproved
2026-05-08 09:28:43 +02:00
JAYICE
696c1aa3e8 lib/fs: introduce new metric for Filesystem type name
This commit introduces a new metric to expose fs type for the provided path.

 For example:
```
vm_fs_info{path="/vmstorage-data", fs_type="xfs"}
```

 Path must be registered with new method `fs.RegisterPathFsMetrics`.

fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10482
2026-05-08 09:17:03 +02:00
Max Kotliar
2d79f2b455 docs/changelog: fix order - first features than bugs.
For some reason bugs were the first.
2026-05-07 21:16:53 +03:00
Kirill Yurkov
1d2ec1947b dsahboards: Add Kafka (Enterprise) row to vmagent dashboard (#10728)
Add a new `Kafka (Enterprise)` row to both vmagent dashboards:

- `dashboards/vmagent.json`
- `dashboards/vm/vmagent.json`

The row is placed before `Drilldown` and contains three Kafka-specific
panels:

- `Kafka bytes`
- `Kafka messages in/out`
- `Kafka and consumer errors`

The goal is to provide a compact Kafka-focused view for enterprise
vmagent deployments without duplicating the existing generic remote
write panels such as connection saturation and persistent queue size.

The new row helps distinguish:

- producer vs consumer throughput at the Kafka topic level
- message-rate shifts that may indicate smaller Kafka payloads and
higher per-message overhead
- producer-side Kafka errors vs consumer-side Kafka errors

Descriptions include links to the relevant Kafka documentation sections.

PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10728

---------

Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-05-07 21:15:21 +03:00
andriibeee
d5e7ecd7b1 app/vmselect: set CORS headers on /api/v1/export endpoints (#10900)
Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10899
PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10900

Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-05-07 21:03:46 +03:00
JAYICE
0c7928b0ff app/vmauth: pick first backend to process request when all backends are unavailable (#10886)
The commit restores the previous behavior where the first backend is still selected and the request is sent to it. This behavior existed before commit 9c36f0931a, but was later changed to return no backends. Hence, vmauth would reject all requests for the next 3s if all backends are unavailable. In some rare cases, it leads to an increase in error responses. 

The commit restores the original behavior, adds comments explaining why it is important, and introduces tests covering the logic.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10837
PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10886

---------

Signed-off-by: JAYICE <1185430411@qq.com>
Signed-off-by: Max Kotliar <kotlyar.maksim@gmail.com>
Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
Co-authored-by: Hui Wang <haley@victoriametrics.com>
2026-05-07 20:44:50 +03:00
Hui Wang
76e0bcdf45 lib/prompb: support prometheus native histogram during ingestion
This commit adds support for Prometheus Native Histogram https://prometheus.io/docs/specs/native_histograms data ingestion via Prometheus RemoteWrite format. It converts Native Histograms into VictoriaMetrics histogram format.

fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10743
2026-05-07 19:06:51 +02:00
JAYICE
03bad6a270 lib/backup: explicitly use MD5 checksum header in S3 DeleteObjects requests (#1038)
The change improves compatibility with 3rd party S3 implementations. MD5 had been a default checksum method for a long time, but in v1.73.0 it was changed to CRC by AWS. Some implementations do not support CRC, such as Dell ECS.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10907
PR https://github.com/VictoriaMetrics/VictoriaMetrics-enterprise/pull/1038

---------

Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-05-07 14:51:34 +03:00
andriibeee
90c9892757 app/vmauth: honor -maxRequestBodySizeToRetry independently of -requestBufferSize (#10882)
This PR makes vmauth honor `-maxRequestBodySizeToRetry` regardless of `-requestBufferSize`. Previously the larger of the two was used, so the retry could not be disabled by setting `-maxRequestBodySizeToRetry=0`, `-requestBufferSize` has to be set to zero too. 

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10857
PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10882

---------

Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-05-07 13:42:41 +03:00
hagen1778
ee8bb76808 docs/articles: add "Creating Kubernetes debugging AI Agent for VictoriaMetrics"
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 20:41:27 +02:00
hagen1778
0554c35d45 docs/articles: merge article and video links into one option
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 20:40:25 +02:00
hagen1778
dd72d3492d docs/articles: update link that was moved from datanami
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 20:02:57 +02:00
hagen1778
f0a147fdf7 docs/articles: drop dead link
Original link can't be found anywhere else, so dropping it.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 20:02:36 +02:00
f41gh7
8474f15359 lib/httpserver: support multitnenacy via headers
This commit adds possibility to omit tenantID in the URL path. In this case,
tenantID will be fetched from HTTP headers `AccountID` and `ProjectID`.
If headers are missing too, then default `0:0` tenantID is used.

This functionality can be enabled only if -enableMultitenantHandlers
cmd-line flag was set to vminsert, vmselect or vmagent.

Motivation: this change makes VM configuration for multienancy
consistent with VL configuration - see
https://docs.victoriametrics.com/victorialogs/#multitenancy. And keeps
backward compatibility in the same time.

fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4241
2026-05-06 17:49:54 +02:00
Roman Khavronenko
8fa785bb64 docs/vmalert: print templates content in a raw format (#10912)
Before, some of the template examples were wrongly renderred by hugo.
For example:
```
http://vm-grafana.com/<dashboard-id>?viewPanel=<panel-id>&from={{($activeAt.Add (parseDurationTime \"-1h\")).UnixMilli}}&to={{($activeAt.Add (parseDurationTime \"1h\")).UnixMilli}}
```
was renderred like:
```
http://vm-grafana.com/ ?viewPanel=&from={{($activeAt.Add (parseDurationTime "-1h")).UnixMilli}}&to={{($activeAt.Add (parseDurationTime "1h")).UnixMilli}}
```

Wrapping examples in ` helps to render them raw.
While there, also fixed some examples.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 17:00:39 +02:00
hagen1778
6bddb233f7 docs: rm duplicated article
https://medium.com/airbnb-engineering/building-a-high-volume-metrics-pipeline-with-opentelemetry-and-vmagent-c714d6910b45 was already mentioned before
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 16:58:15 +02:00
hagen1778
4bb874df1c docs: add link to https://docs.victoriametrics.com/guides/
Mention https://docs.victoriametrics.com/guides/ in the Articles/guides.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-05-06 16:56:59 +02:00
Julius Rickert
099ec5c25a lib/promscrape//etzner: update hetzner_sd_configs for Hetzner Cloud datacenter → location API change
On 2025-12-16, Hetzner Cloud deprecated the `datacenter` field in their
Servers API and introduced a top-level `location` field carrying the
same data. The `datacenter` field will be removed after 2026-07-01.
Without this change, `__meta_hetzner_hcloud_datacenter_location`, and
`__meta_hetzner_hcloud_datacenter_location_network_zone` would silently
become empty for the `hcloud` role after that date.

This mirrors the change made in Prometheus v3.11.0
([prometheus/prometheus#17850](https://github.com/prometheus/prometheus/pull/17850)).

## Changes

**`hcloud` role:**
- Add `HCloudLocation` struct and `Location` field on `HCloudServer`,
mapped to the new top-level `location` API field
- Emit two new canonical labels: `__meta_hetzner_hcloud_location` and
`__meta_hetzner_hcloud_location_network_zone`
- Keep the deprecated `__meta_hetzner_hcloud_datacenter_location` and
`__meta_hetzner_hcloud_datacenter_location_network_zone` labels, now
sourced from the new `location` field so they continue to work past
2026-07-01
- `__meta_hetzner_datacenter` (the datacenter name, e.g. `fsn1-dc14`) is
unaffected for this role — the datacenter name is a distinct concept
from location and is kept as-is (this will stop working starting
2026-07-01)

**`robot` role:**
- Add `__meta_hetzner_robot_datacenter` as the canonical replacement for
`__meta_hetzner_datacenter`; the old label is kept for backward
compatibility

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10909
2026-05-05 17:51:13 +02:00
Max Kotliar
eb459df85e docs/changelog: add update note about bug in vminsert 2026-04-30 21:07:28 +03:00
Max Kotliar
ebc9d49e50 docs: forward port LTS v1.136.8 changelog to upstream
Signed-off-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-04-30 20:50:48 +03:00
f41gh7
b2a6fba673 docs/changelog: mention vminsert enterprise bugfix
At v1.142.0 was introduced a bug, when changes from OSS version were
 back-ported into Enterprise branch. It changed the order of storage
 nodes discovery. And resulted into:
 * overwrite of discovered storage nodes
 * duplicate of per storage node metrics

  This bug only affects enterprise vminsert version.
2026-04-30 17:13:40 +02:00
Roman Khavronenko
6100b8ba10 docs/vmalert: mention -rule.stripFilePath in #security (#10902)
Mention -rule.stripFilePath cmd-limne flag in security recommendations,
so users can be aware of it.

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Haley Wang <haley@victoriametrics.com>
2026-04-29 20:01:25 +02:00
Roman Khavronenko
403d32f57f docs: mention AI observability (#10903)
The change adds `AI observability` section to `AI tools` documentation.
It mentions excellent @Amper articles describing these integrations in
all details.

The doc change doesn't repeat the articles, but rather helps users to
discover them.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2026-04-29 20:00:49 +02:00
Mathias Palmersheim
ed8ebb8314 docs/vmalert: clarified urls for tenant option (#10898)
Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10897 by clarifying what URLS should be used for `-datasource.url`, `-remoteRead.url`, and `-remoteWrite.url` when `-clusterMode` is specified.


PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10898

---------

Co-authored-by: Haley Wang <haley@victoriametrics.com>
2026-04-29 12:18:08 +03:00
Hui Wang
55c8bb26db docs: polish stream aggregation doc (#10896)
PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/10896

Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>
2026-04-29 12:12:31 +03:00
Max Kotliar
129358f9ea docs: update release guidance doc (#10887)
Leave only generic details about the release process in public docs.

To maintainers: 
All internal details are described in
https://github.com/VictoriaMetrics/release/blob/main/README.md. The new
document contains up-to-date release process guidance. Please refer to
it instead while preparing a new release.

An archived version of this document is available at:
https://github.com/VictoriaMetrics/release/blob/main/legacy_docs/Release-Guide.md.
2026-04-29 12:04:59 +03:00