mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-28 22:31:26 +03:00
Compare commits
13 Commits
v1.97.10
...
streamaggr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe9113b5b2 | ||
|
|
ec0abe736a | ||
|
|
6434fa2c4e | ||
|
|
6b9f57e5f7 | ||
|
|
7e53324f5d | ||
|
|
5ee3bc98d6 | ||
|
|
0204ce942d | ||
|
|
d656934d22 | ||
|
|
ac82b5aea6 | ||
|
|
e8c7d6373e | ||
|
|
b17fce3e4b | ||
|
|
7ecf68093f | ||
|
|
50487823ab |
@@ -15,6 +15,7 @@ import (
|
||||
|
||||
"github.com/golang/snappy"
|
||||
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/cgroup"
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/netutil"
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promauth"
|
||||
@@ -22,11 +23,12 @@ import (
|
||||
"github.com/VictoriaMetrics/metrics"
|
||||
)
|
||||
|
||||
var defaultConcurrency = cgroup.AvailableCPUs() * 2
|
||||
|
||||
const (
|
||||
defaultConcurrency = 4
|
||||
defaultMaxBatchSize = 1e3
|
||||
defaultMaxQueueSize = 1e5
|
||||
defaultFlushInterval = 5 * time.Second
|
||||
defaultMaxBatchSize = 1e4
|
||||
defaultMaxQueueSize = 1e6
|
||||
defaultFlushInterval = 2 * time.Second
|
||||
defaultWriteTimeout = 30 * time.Second
|
||||
)
|
||||
|
||||
|
||||
@@ -34,10 +34,10 @@ var (
|
||||
|
||||
idleConnectionTimeout = flag.Duration("remoteWrite.idleConnTimeout", 50*time.Second, `Defines a duration for idle (keep-alive connections) to exist. Consider settings this value less to the value of "-http.idleConnTimeout". It must prevent possible "write: broken pipe" and "read: connection reset by peer" errors.`)
|
||||
|
||||
maxQueueSize = flag.Int("remoteWrite.maxQueueSize", 1e6, "Defines the max number of pending datapoints to remote write endpoint")
|
||||
maxBatchSize = flag.Int("remoteWrite.maxBatchSize", 1e4, "Defines max number of timeseries to be flushed at once")
|
||||
concurrency = flag.Int("remoteWrite.concurrency", 4, "Defines number of writers for concurrent writing into remote write endpoint")
|
||||
flushInterval = flag.Duration("remoteWrite.flushInterval", 5*time.Second, "Defines interval of flushes to remote write endpoint")
|
||||
maxQueueSize = flag.Int("remoteWrite.maxQueueSize", defaultMaxQueueSize, "Defines the max number of pending datapoints to remote write endpoint")
|
||||
maxBatchSize = flag.Int("remoteWrite.maxBatchSize", defaultMaxBatchSize, "Defines max number of timeseries to be flushed at once")
|
||||
concurrency = flag.Int("remoteWrite.concurrency", defaultConcurrency, "Defines number of writers for concurrent writing into remote write endpoint")
|
||||
flushInterval = flag.Duration("remoteWrite.flushInterval", defaultFlushInterval, "Defines interval of flushes to remote write endpoint")
|
||||
|
||||
tlsInsecureSkipVerify = flag.Bool("remoteWrite.tlsInsecureSkipVerify", false, "Whether to skip tls verification when connecting to -remoteWrite.url")
|
||||
tlsCertFile = flag.String("remoteWrite.tlsCertFile", "", "Optional path to client-side TLS certificate file to use when connecting to -remoteWrite.url")
|
||||
|
||||
@@ -215,8 +215,10 @@ func recordingToAPI(rr *rule.RecordingRule) apiRule {
|
||||
Updates: rule.GetAllRuleState(rr),
|
||||
|
||||
// encode as strings to avoid rounding
|
||||
ID: fmt.Sprintf("%d", rr.ID()),
|
||||
GroupID: fmt.Sprintf("%d", rr.GroupID),
|
||||
ID: fmt.Sprintf("%d", rr.ID()),
|
||||
GroupID: fmt.Sprintf("%d", rr.GroupID),
|
||||
GroupName: rr.GroupName,
|
||||
File: rr.File,
|
||||
}
|
||||
if lastState.Err != nil {
|
||||
r.LastError = lastState.Err.Error()
|
||||
|
||||
@@ -1,9 +1,56 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/config"
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/datasource"
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/app/vmalert/rule"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRecordingToApi(t *testing.T) {
|
||||
fq := &datasource.FakeQuerier{}
|
||||
fq.Add(datasource.Metric{
|
||||
Values: []float64{1}, Timestamps: []int64{0},
|
||||
})
|
||||
g := &rule.Group{
|
||||
Name: "group",
|
||||
File: "rules.yaml",
|
||||
Concurrency: 1,
|
||||
}
|
||||
|
||||
entriesLimit := 44
|
||||
rr := rule.NewRecordingRule(fq, g, config.Rule{
|
||||
ID: 1248,
|
||||
Record: "record_name",
|
||||
Expr: "up",
|
||||
Labels: map[string]string{"label": "value"},
|
||||
UpdateEntriesLimit: &entriesLimit,
|
||||
})
|
||||
|
||||
expectedRes := apiRule{
|
||||
Name: "record_name",
|
||||
Query: "up",
|
||||
Labels: map[string]string{"label": "value"},
|
||||
Health: "ok",
|
||||
Type: ruleTypeRecording,
|
||||
DatasourceType: "prometheus",
|
||||
ID: "1248",
|
||||
GroupID: fmt.Sprintf("%d", g.ID()),
|
||||
GroupName: "group",
|
||||
File: "rules.yaml",
|
||||
MaxUpdates: 44,
|
||||
Updates: make([]rule.StateEntry, 0),
|
||||
}
|
||||
|
||||
res := recordingToAPI(rr)
|
||||
|
||||
if !reflect.DeepEqual(res, expectedRes) {
|
||||
t.Fatalf("expected to have: \n%v;\ngot: \n%v", expectedRes, res)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUrlValuesToStrings(t *testing.T) {
|
||||
mapQueryParams := map[string][]string{
|
||||
"param1": {"param1"},
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
# And forward them to --remoteWrite.url
|
||||
vmagent:
|
||||
container_name: vmagent
|
||||
image: victoriametrics/vmagent:v1.104.0
|
||||
image: victoriametrics/vmagent:v1.105.0
|
||||
depends_on:
|
||||
- "vminsert"
|
||||
ports:
|
||||
@@ -13,8 +13,8 @@ services:
|
||||
- vmagentdata:/vmagentdata
|
||||
- ./prometheus-cluster.yml:/etc/prometheus/prometheus.yml
|
||||
command:
|
||||
- '--promscrape.config=/etc/prometheus/prometheus.yml'
|
||||
- '--remoteWrite.url=http://vminsert:8480/insert/0/prometheus/'
|
||||
- "--promscrape.config=/etc/prometheus/prometheus.yml"
|
||||
- "--remoteWrite.url=http://vminsert:8480/insert/0/prometheus/"
|
||||
restart: always
|
||||
|
||||
# Grafana instance configured with VictoriaMetrics as datasource
|
||||
@@ -39,7 +39,7 @@ services:
|
||||
# where N is number of vmstorages (2 in this case).
|
||||
vmstorage-1:
|
||||
container_name: vmstorage-1
|
||||
image: victoriametrics/vmstorage:v1.104.0-cluster
|
||||
image: victoriametrics/vmstorage:v1.105.0-cluster
|
||||
ports:
|
||||
- 8482
|
||||
- 8400
|
||||
@@ -47,11 +47,11 @@ services:
|
||||
volumes:
|
||||
- strgdata-1:/storage
|
||||
command:
|
||||
- '--storageDataPath=/storage'
|
||||
- "--storageDataPath=/storage"
|
||||
restart: always
|
||||
vmstorage-2:
|
||||
container_name: vmstorage-2
|
||||
image: victoriametrics/vmstorage:v1.104.0-cluster
|
||||
image: victoriametrics/vmstorage:v1.105.0-cluster
|
||||
ports:
|
||||
- 8482
|
||||
- 8400
|
||||
@@ -59,20 +59,20 @@ services:
|
||||
volumes:
|
||||
- strgdata-2:/storage
|
||||
command:
|
||||
- '--storageDataPath=/storage'
|
||||
- "--storageDataPath=/storage"
|
||||
restart: always
|
||||
|
||||
# vminsert is ingestion frontend. It receives metrics pushed by vmagent,
|
||||
# pre-process them and distributes across configured vmstorage shards.
|
||||
vminsert:
|
||||
container_name: vminsert
|
||||
image: victoriametrics/vminsert:v1.104.0-cluster
|
||||
image: victoriametrics/vminsert:v1.105.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
- "vmstorage-2"
|
||||
command:
|
||||
- '--storageNode=vmstorage-1:8400'
|
||||
- '--storageNode=vmstorage-2:8400'
|
||||
- "--storageNode=vmstorage-1:8400"
|
||||
- "--storageNode=vmstorage-2:8400"
|
||||
ports:
|
||||
- 8480:8480
|
||||
restart: always
|
||||
@@ -81,27 +81,27 @@ services:
|
||||
# vmselect collects results from configured `--storageNode` shards.
|
||||
vmselect-1:
|
||||
container_name: vmselect-1
|
||||
image: victoriametrics/vmselect:v1.104.0-cluster
|
||||
image: victoriametrics/vmselect:v1.105.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
- "vmstorage-2"
|
||||
command:
|
||||
- '--storageNode=vmstorage-1:8401'
|
||||
- '--storageNode=vmstorage-2:8401'
|
||||
- '--vmalert.proxyURL=http://vmalert:8880'
|
||||
- "--storageNode=vmstorage-1:8401"
|
||||
- "--storageNode=vmstorage-2:8401"
|
||||
- "--vmalert.proxyURL=http://vmalert:8880"
|
||||
ports:
|
||||
- 8481
|
||||
restart: always
|
||||
vmselect-2:
|
||||
container_name: vmselect-2
|
||||
image: victoriametrics/vmselect:v1.104.0-cluster
|
||||
image: victoriametrics/vmselect:v1.105.0-cluster
|
||||
depends_on:
|
||||
- "vmstorage-1"
|
||||
- "vmstorage-2"
|
||||
command:
|
||||
- '--storageNode=vmstorage-1:8401'
|
||||
- '--storageNode=vmstorage-2:8401'
|
||||
- '--vmalert.proxyURL=http://vmalert:8880'
|
||||
- "--storageNode=vmstorage-1:8401"
|
||||
- "--storageNode=vmstorage-2:8401"
|
||||
- "--vmalert.proxyURL=http://vmalert:8880"
|
||||
ports:
|
||||
- 8481
|
||||
restart: always
|
||||
@@ -112,14 +112,14 @@ services:
|
||||
# It can be used as an authentication proxy.
|
||||
vmauth:
|
||||
container_name: vmauth
|
||||
image: victoriametrics/vmauth:v1.104.0
|
||||
image: victoriametrics/vmauth:v1.105.0
|
||||
depends_on:
|
||||
- "vmselect-1"
|
||||
- "vmselect-2"
|
||||
volumes:
|
||||
- ./auth-cluster.yml:/etc/auth.yml
|
||||
command:
|
||||
- '--auth.config=/etc/auth.yml'
|
||||
- "--auth.config=/etc/auth.yml"
|
||||
ports:
|
||||
- 8427:8427
|
||||
restart: always
|
||||
@@ -127,7 +127,7 @@ services:
|
||||
# vmalert executes alerting and recording rules
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.104.0
|
||||
image: victoriametrics/vmalert:v1.105.0
|
||||
depends_on:
|
||||
- "vmauth"
|
||||
ports:
|
||||
@@ -138,13 +138,13 @@ services:
|
||||
- ./alerts-vmagent.yml:/etc/alerts/alerts-vmagent.yml
|
||||
- ./alerts-vmalert.yml:/etc/alerts/alerts-vmalert.yml
|
||||
command:
|
||||
- '--datasource.url=http://vmauth:8427/select/0/prometheus'
|
||||
- '--remoteRead.url=http://vmauth:8427/select/0/prometheus'
|
||||
- '--remoteWrite.url=http://vminsert:8480/insert/0/prometheus'
|
||||
- '--notifier.url=http://alertmanager:9093/'
|
||||
- '--rule=/etc/alerts/*.yml'
|
||||
- "--datasource.url=http://vmauth:8427/select/0/prometheus"
|
||||
- "--remoteRead.url=http://vmauth:8427/select/0/prometheus"
|
||||
- "--remoteWrite.url=http://vminsert:8480/insert/0/prometheus"
|
||||
- "--notifier.url=http://alertmanager:9093/"
|
||||
- "--rule=/etc/alerts/*.yml"
|
||||
# display source of alerts in grafana
|
||||
- '-external.url=http://127.0.0.1:3000' #grafana outside container
|
||||
- "-external.url=http://127.0.0.1:3000" #grafana outside container
|
||||
- '--external.alert.source=explore?orgId=1&left={"datasource":"VictoriaMetrics","queries":[{"expr":{{.Expr|jsonEscape|queryEscape}},"refId":"A"}],"range":{"from":"{{ .ActiveAt.UnixMilli }}","to":"now"}}'
|
||||
restart: always
|
||||
|
||||
@@ -156,7 +156,7 @@ services:
|
||||
volumes:
|
||||
- ./alertmanager.yml:/config/alertmanager.yml
|
||||
command:
|
||||
- '--config.file=/config/alertmanager.yml'
|
||||
- "--config.file=/config/alertmanager.yml"
|
||||
ports:
|
||||
- 9093:9093
|
||||
restart: always
|
||||
|
||||
@@ -36,8 +36,8 @@ services:
|
||||
networks:
|
||||
- vm_net
|
||||
|
||||
# VictoriaLogs instance, a single process responsible for
|
||||
# storing logs and serving read queries.
|
||||
# VictoriaLogs instance, a single process responsible for
|
||||
# storing logs and serving read queries.
|
||||
victorialogs:
|
||||
container_name: victorialogs
|
||||
image: docker.io/victoriametrics/victoria-logs:v0.37.0-victorialogs
|
||||
@@ -55,7 +55,7 @@ services:
|
||||
# scraping, storing metrics and serve read requests.
|
||||
victoriametrics:
|
||||
container_name: victoriametrics
|
||||
image: victoriametrics/victoria-metrics:v1.104.0
|
||||
image: victoriametrics/victoria-metrics:v1.105.0
|
||||
ports:
|
||||
- 8428:8428
|
||||
volumes:
|
||||
@@ -72,7 +72,7 @@ services:
|
||||
# vmalert executes alerting and recording rules
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.104.0
|
||||
image: victoriametrics/vmalert:v1.105.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
- "alertmanager"
|
||||
|
||||
@@ -4,7 +4,7 @@ services:
|
||||
# And forward them to --remoteWrite.url
|
||||
vmagent:
|
||||
container_name: vmagent
|
||||
image: victoriametrics/vmagent:v1.104.0
|
||||
image: victoriametrics/vmagent:v1.105.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
# storing metrics and serve read requests.
|
||||
victoriametrics:
|
||||
container_name: victoriametrics
|
||||
image: victoriametrics/victoria-metrics:v1.104.0
|
||||
image: victoriametrics/victoria-metrics:v1.105.0
|
||||
ports:
|
||||
- 8428:8428
|
||||
- 8089:8089
|
||||
@@ -65,7 +65,7 @@ services:
|
||||
# vmalert executes alerting and recording rules
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.104.0
|
||||
image: victoriametrics/vmalert:v1.105.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
- "alertmanager"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
services:
|
||||
vmagent:
|
||||
container_name: vmagent
|
||||
image: victoriametrics/vmagent:v1.104.0
|
||||
image: victoriametrics/vmagent:v1.105.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
@@ -18,7 +18,7 @@ services:
|
||||
|
||||
victoriametrics:
|
||||
container_name: victoriametrics
|
||||
image: victoriametrics/victoria-metrics:v1.104.0
|
||||
image: victoriametrics/victoria-metrics:v1.105.0
|
||||
ports:
|
||||
- 8428:8428
|
||||
volumes:
|
||||
@@ -48,10 +48,9 @@ services:
|
||||
- vm_net
|
||||
restart: always
|
||||
|
||||
|
||||
vmalert:
|
||||
container_name: vmalert
|
||||
image: victoriametrics/vmalert:v1.104.0
|
||||
image: victoriametrics/vmalert:v1.105.0
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
@@ -73,7 +72,7 @@ services:
|
||||
restart: always
|
||||
vmanomaly:
|
||||
container_name: vmanomaly
|
||||
image: victoriametrics/vmanomaly:v1.17.1
|
||||
image: victoriametrics/vmanomaly:v1.17.2
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
# Run `make package-victoria-logs` to build victoria-logs image
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
volumes:
|
||||
- vlogs:/vlogs
|
||||
ports:
|
||||
- '9428:9428'
|
||||
- "9428:9428"
|
||||
command:
|
||||
- -storageDataPath=/vlogs
|
||||
|
||||
@@ -30,10 +30,10 @@ services:
|
||||
- /sys:/host/sys:ro
|
||||
- /:/rootfs:ro
|
||||
command:
|
||||
- '--path.procfs=/host/proc'
|
||||
- '--path.rootfs=/rootfs'
|
||||
- '--path.sysfs=/host/sys'
|
||||
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
||||
- "--path.procfs=/host/proc"
|
||||
- "--path.rootfs=/rootfs"
|
||||
- "--path.sysfs=/host/sys"
|
||||
- "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)"
|
||||
|
||||
du-exporter:
|
||||
image: ghcr.io/dundee/disk_usage_exporter/disk_usage_exporter-c4084307c537335c2ddb6f4b9b527422:latest
|
||||
@@ -43,12 +43,12 @@ services:
|
||||
- /var/lib/docker/volumes:/var/lib/docker/volumes:ro
|
||||
- ./du/config.yml:/config.yml:ro
|
||||
command:
|
||||
- '--config=/config.yml'
|
||||
- "--config=/config.yml"
|
||||
|
||||
vmsingle:
|
||||
image: victoriametrics/victoria-metrics:v1.104.0
|
||||
image: victoriametrics/victoria-metrics:v1.105.0
|
||||
ports:
|
||||
- '8428:8428'
|
||||
- "8428:8428"
|
||||
command:
|
||||
- -storageDataPath=/vmsingle
|
||||
- -promscrape.config=/promscrape.yml
|
||||
|
||||
@@ -1091,7 +1091,7 @@ Report bugs and propose new features [here](https://github.com/VictoriaMetrics/V
|
||||
|
||||
Below is the output for `/path/to/vminsert -help`:
|
||||
|
||||
```
|
||||
```shellhelp
|
||||
-blockcache.missesBeforeCaching int
|
||||
The number of cache misses before putting the block into cache. Higher values may reduce indexdb/dataBlocks cache size at the cost of higher CPU and disk read usage (default 2)
|
||||
-cacheExpireDuration duration
|
||||
|
||||
@@ -2790,7 +2790,7 @@ Files included in each folder:
|
||||
|
||||
Pass `-help` to VictoriaMetrics in order to see the list of supported command-line flags with their description:
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
-bigMergeConcurrency int
|
||||
Deprecated: this flag does nothing
|
||||
-blockcache.missesBeforeCaching int
|
||||
|
||||
@@ -95,7 +95,7 @@ docker-compose -f docker-compose.yaml up
|
||||
|
||||
After Grafana starts successfully, datasource should be available in the datasources tab
|
||||
|
||||
<img src="provision_datasources.webp" width="800" alt="Configuration">
|
||||

|
||||
|
||||
### Install in Kubernetes
|
||||
|
||||
|
||||
@@ -11,10 +11,19 @@ aliases:
|
||||
---
|
||||
Please find the changelog for VictoriaMetrics Anomaly Detection below.
|
||||
|
||||
## v1.17.2
|
||||
Released: 2024-10-22
|
||||
|
||||
- IMPROVEMENT: Added `vmanomaly_version_info` (service) and `vmanomaly_ui_version_info` (vmui) gauges to self-monitoring metrics.
|
||||
- IMPROVEMENT: Added `instance` and `job` labels to [pushed](https://docs.victoriametrics.com/keyconcepts/#push-model) metrics so they have the same labels as vmanomaly metrics that are [pulled](https://docs.victoriametrics.com/keyconcepts/#pull-model)/scraped. Metric labels can be customized via the [`extra_labels` argument](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/?highlight=extra_labels#push-config-parameters). By default job label will be `vmanomaly` and the instance label will be `f'{hostname}:{vmanomaly_port}`. See [monitoring.push](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#push-config-parameters) for examples and details.
|
||||
- IMPROVEMENT: Added a subsection to [monitoring](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#logs-generated-by-vmanomaly) page with detailed per-component service logs, including reader and writer logs, error handling, metrics updates, and multi-tenancy warnings.
|
||||
- IMPROVEMENT: Added a new [Command-line arguments](https://docs.victoriametrics.com/anomaly-detection/quickstart/#command-line-arguments) subsection to the [Quickstart guide](https://docs.victoriametrics.com/anomaly-detection/quickstart/), providing details on available options for configuring `vmanomaly`.
|
||||
|
||||
|
||||
## v1.17.1
|
||||
Released: 2024-10-18
|
||||
|
||||
- FIX: Fixed an issue occurred when [Prophet model](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) is trained on *constant* data (data consisting of the same value and no variation across time). The bug prevented the `fit` stage from completing successfully, resulting in the model instance not being stored in the model registry, after automated model cleanup was addded in [v1.17.0](#1170).
|
||||
- FIX: [Prophet models](https://docs.victoriametrics.com/anomaly-detection/components/models/#prophet) no longer fail to train on *constant* data, data consisting of the same value and no variation across time. The bug prevented the `fit` stage from completing successfully, resulting in the model instance not being stored in the model registry, after automated model cleanup was added in [v1.17.0](#1170).
|
||||
|
||||
## v1.17.0
|
||||
Released: 2024-10-17
|
||||
|
||||
@@ -132,7 +132,7 @@ services:
|
||||
# ...
|
||||
vmanomaly:
|
||||
container_name: vmanomaly
|
||||
image: victoriametrics/vmanomaly:v1.17.1
|
||||
image: victoriametrics/vmanomaly:v1.17.2
|
||||
# ...
|
||||
ports:
|
||||
- "8490:8490"
|
||||
@@ -230,7 +230,7 @@ P.s. `infer` data volume will remain the same for both models, so it does not af
|
||||
|
||||
If you're dealing with a large query in the `queries` argument of [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader) (especially when running [within a scheduler using a long](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/?highlight=fit_window#periodic-scheduler) `fit_window`), you may encounter issues such as query timeouts (due to the `search.maxQueryDuration` server limit) or rejections (if the `search.maxPointsPerTimeseries` server limit is exceeded).
|
||||
|
||||
We recommend upgrading to [v1.17.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171), which introduced the `max_points_per_query` argument (both global and [query-specific](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters)) for the [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader). This argument overrides how `search.maxPointsPerTimeseries` flag handling (introduced in [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)) is used in `vmanomaly` for splitting long `fit_window` queries into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead.
|
||||
We recommend upgrading to [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171), which introduced the `max_points_per_query` argument (both global and [query-specific](https://docs.victoriametrics.com/anomaly-detection/components/reader/#per-query-parameters)) for the [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/reader/#vm-reader). This argument overrides how `search.maxPointsPerTimeseries` flag handling (introduced in [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)) is used in `vmanomaly` for splitting long `fit_window` queries into smaller sub-intervals. This helps users avoid hitting the `search.maxQueryDuration` limit for individual queries by distributing initial query across multiple subquery requests with minimal overhead.
|
||||
|
||||
By splitting long `fit_window` queries into smaller sub-intervals, this helps avoid hitting the `search.maxQueryDuration` limit, distributing the load across multiple subquery requests with minimal overhead. To resolve the issue, reduce `max_points_per_query` to a value lower than `search.maxPointsPerTimeseries` until the problem is gone:
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ This will expose metrics at `http://0.0.0.0:8080/metrics` page.
|
||||
To use *vmanomaly* you need to pull docker image:
|
||||
|
||||
```sh
|
||||
docker pull victoriametrics/vmanomaly:v1.17.1
|
||||
docker pull victoriametrics/vmanomaly:v1.17.2
|
||||
```
|
||||
|
||||
> Note: please check what is latest release in [CHANGELOG](https://docs.victoriametrics.com/anomaly-detection/changelog/)
|
||||
@@ -239,7 +239,7 @@ docker pull victoriametrics/vmanomaly:v1.17.1
|
||||
You can put a tag on it for your convenience:
|
||||
|
||||
```sh
|
||||
docker image tag victoriametrics/vmanomaly:v1.17.1 vmanomaly
|
||||
docker image tag victoriametrics/vmanomaly:v1.17.2 vmanomaly
|
||||
```
|
||||
Here is an example of how to run *vmanomaly* docker container with [license file](#licensing):
|
||||
|
||||
|
||||
@@ -25,6 +25,30 @@ The following options are available:
|
||||
|
||||
> **Note**: Starting from [v1.16.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1160), a similar optimization is available for data read from VictoriaMetrics TSDB. See instructions [here](https://docs.victoriametrics.com/anomaly-detection/faq/#on-disk-mode).
|
||||
|
||||
### Command-line arguments
|
||||
|
||||
The `vmanomaly` service supports several command-line arguments to configure its behavior, including options for licensing, logging levels, and more. These arguments can be passed when starting the service via Docker or any other setup. Below is the list of available options:
|
||||
|
||||
|
||||
```shellhelp
|
||||
VictoriaMetrics Anomaly Detection Service
|
||||
|
||||
positional arguments:
|
||||
config YAML config file. Multiple files will override each other's top level values (aka shallow merge), so multiple configs can be combined.
|
||||
|
||||
options:
|
||||
-h show this help message and exit
|
||||
--license STRING License key for VictoriaMetrics Enterprise. See https://victoriametrics.com/products/enterprise/trial/ to obtain a trial license.
|
||||
--licenseFile PATH Path to file with license key for VictoriaMetrics Enterprise. See https://victoriametrics.com/products/enterprise/trial/ to obtain a trial license.
|
||||
--license.forceOffline
|
||||
Whether to force offline verification for VictoriaMetrics Enterprise license key, which has been passed either via -license or via -licenseFile command-line flag.
|
||||
The issued license key must support offline verification feature. Contact info@victoriametrics.com if you need offline license verification.
|
||||
--loggerLevel {FATAL,WARNING,ERROR,DEBUG,INFO}
|
||||
Minimum level to log. Possible values: DEBUG, INFO, WARNING, ERROR, FATAL.
|
||||
```
|
||||
|
||||
You can specify these options when running `vmanomaly` to fine-tune logging levels or handle licensing configurations, as per your requirements.
|
||||
|
||||
### Docker
|
||||
|
||||
> To run `vmanomaly`, you need to have VictoriaMetrics Enterprise license. You can get a trial license key [**here**](https://victoriametrics.com/products/enterprise/trial/).
|
||||
@@ -34,13 +58,13 @@ Below are the steps to get `vmanomaly` up and running inside a Docker container:
|
||||
1. Pull Docker image:
|
||||
|
||||
```sh
|
||||
docker pull victoriametrics/vmanomaly:v1.17.1
|
||||
docker pull victoriametrics/vmanomaly:v1.17.2
|
||||
```
|
||||
|
||||
2. (Optional step) tag the `vmanomaly` Docker image:
|
||||
|
||||
```sh
|
||||
docker image tag victoriametrics/vmanomaly:v1.17.1 vmanomaly
|
||||
docker image tag victoriametrics/vmanomaly:v1.17.2 vmanomaly
|
||||
```
|
||||
|
||||
3. Start the `vmanomaly` Docker container with a *license file*, use the command below.
|
||||
@@ -52,7 +76,8 @@ export YOUR_CONFIG_FILE_PATH=path/to/config/file
|
||||
docker run -it -v $YOUR_LICENSE_FILE_PATH:/license \
|
||||
-v $YOUR_CONFIG_FILE_PATH:/config.yml \
|
||||
vmanomaly /config.yml \
|
||||
--licenseFile=/license
|
||||
--licenseFile=/license \
|
||||
--loggerLevel=INFO
|
||||
```
|
||||
|
||||
In case you found `PermissionError: [Errno 13] Permission denied:` in `vmanomaly` logs, set user/user group to 1000 in the run command above / in a docker-compose file:
|
||||
@@ -64,7 +89,8 @@ docker run -it --user 1000:1000 \
|
||||
-v $YOUR_LICENSE_FILE_PATH:/license \
|
||||
-v $YOUR_CONFIG_FILE_PATH:/config.yml \
|
||||
vmanomaly /config.yml \
|
||||
--licenseFile=/license
|
||||
--licenseFile=/license \
|
||||
--loggerLevel=INFO
|
||||
```
|
||||
|
||||
```yaml
|
||||
@@ -72,13 +98,14 @@ docker run -it --user 1000:1000 \
|
||||
services:
|
||||
# ...
|
||||
vmanomaly:
|
||||
image: victoriametrics/vmanomaly:v1.17.1
|
||||
image: victoriametrics/vmanomaly:v1.17.2
|
||||
volumes:
|
||||
$YOUR_LICENSE_FILE_PATH:/license
|
||||
$YOUR_CONFIG_FILE_PATH:/config.yml
|
||||
command:
|
||||
- "/config.yml"
|
||||
- "--licenseFile=/license"
|
||||
- "--loggerLevel=INFO"
|
||||
# ...
|
||||
```
|
||||
|
||||
|
||||
@@ -962,7 +962,7 @@ monitoring:
|
||||
Let's pull the docker image for `vmanomaly`:
|
||||
|
||||
```sh
|
||||
docker pull victoriametrics/vmanomaly:v1.17.0
|
||||
docker pull victoriametrics/vmanomaly:v1.17.2
|
||||
```
|
||||
|
||||
Now we can run the docker container putting as volumes both config and model file:
|
||||
@@ -976,7 +976,7 @@ docker run -it \
|
||||
-v $(PWD)/license:/license \
|
||||
-v $(PWD)/custom_model.py:/vmanomaly/model/custom.py \
|
||||
-v $(PWD)/custom.yaml:/config.yaml \
|
||||
victoriametrics/vmanomaly:v1.17.0 /config.yaml \
|
||||
victoriametrics/vmanomaly:v1.17.2 /config.yaml \
|
||||
--licenseFile=/license
|
||||
```
|
||||
|
||||
|
||||
@@ -226,6 +226,13 @@ For detailed guidance on configuring mTLS parameters such as `verify_tls`, `tls_
|
||||
|
||||
## Metrics generated by vmanomaly
|
||||
|
||||
- [Startup metrics](#startup-metrics)
|
||||
- [Reader metrics](#reader-behaviour-metrics)
|
||||
- [Model metrics](#models-behaviour-metrics)
|
||||
- [Writer metrics](#writer-behaviour-metrics)
|
||||
|
||||
### Startup metrics
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -243,10 +250,120 @@ For detailed guidance on configuring mTLS parameters such as `verify_tls`, `tls_
|
||||
<td>Gauge</td>
|
||||
<td>vmanomaly start time in UNIX time</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_version_info`
|
||||
</td>
|
||||
<td>Gauge</td>
|
||||
<td>vmanomaly version information, contained in `version` label. Added in [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1172)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_ui_version_info`
|
||||
</td>
|
||||
<td>Gauge</td>
|
||||
<td>vmanomaly UI version information, contained in `version` label. Added in [v1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1172)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Models Behaviour Metrics
|
||||
[Back to metric sections](#metrics-generated-by-vmanomaly)
|
||||
|
||||
### Reader behaviour metrics
|
||||
Label names [description](#labelnames)
|
||||
|
||||
> **Note**: additional labels (`scheduler_alias`, `preset`) were added to writer and reader metrics in [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170) to improve consistency across the components. Also, metrics `vmanomaly_reader_request_duration_seconds` and `vmanomaly_reader_response_parsing_seconds` changed their type to `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)).
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Metric</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Labelnames</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_request_duration_seconds`
|
||||
</td>
|
||||
<td>`Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))</td>
|
||||
<td>The total time (in seconds) taken by queries to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`url`, `query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_responses` (named `vmanomaly_reader_response_count` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The count of responses received from VictoriaMetrics `url` for the `query_key` query, categorized by `code`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`url`, `query_key`, `code`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_received_bytes`
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The total number of bytes received in responses for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_response_parsing_seconds`
|
||||
</td>
|
||||
<td>`Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))</td>
|
||||
<td>The total time (in seconds) taken for data parsing at each `step` (json, dataframe) for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`step`, `query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_timeseries_received`
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The total number of timeseries received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_datapoints_received`
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The total number of datapoints received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
[Back to metric sections](#metrics-generated-by-vmanomaly)
|
||||
|
||||
### Models behaviour metrics
|
||||
Label names [description](#labelnames)
|
||||
|
||||
> **Note**: There is a new label key `model_alias` introduced in multi-model support [v1.10.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1100). This label key adjustment was made to preserve unique label set production during writing produced metrics back to VictoriaMetrics.
|
||||
@@ -349,7 +466,9 @@ Label names [description](#labelnames)
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Writer Behaviour Metrics
|
||||
[Back to metric sections](#metrics-generated-by-vmanomaly)
|
||||
|
||||
### Writer behaviour metrics
|
||||
Label names [description](#labelnames)
|
||||
|
||||
> **Note**: additional labels (`scheduler_alias`, `preset`) were added to writer and reader metrics in [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170) to improve consistency across the components. Also, metrics `vmanomaly_writer_request_duration_seconds` and `vmanomaly_writer_request_serialize_seconds` changed their type to `Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)).
|
||||
@@ -439,93 +558,7 @@ Label names [description](#labelnames)
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### Reader Behaviour Metrics
|
||||
Label names [description](#labelnames)
|
||||
|
||||
<table class="params">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Metric</th>
|
||||
<th>Type</th>
|
||||
<th>Description</th>
|
||||
<th>Labelnames</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_request_duration_seconds`
|
||||
</td>
|
||||
<td>`Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))</td>
|
||||
<td>The total time (in seconds) taken by queries to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`url`, `query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_responses` (named `vmanomaly_reader_response_count` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The count of responses received from VictoriaMetrics `url` for the `query_key` query, categorized by `code`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`url`, `query_key`, `code`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_received_bytes`
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The total number of bytes received in responses for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_response_parsing_seconds`
|
||||
</td>
|
||||
<td>`Histogram` (was `Summary` prior to [v1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170))</td>
|
||||
<td>The total time (in seconds) taken for data parsing at each `step` (json, dataframe) for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`step`, `query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_timeseries_received`
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The total number of timeseries received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
`vmanomaly_reader_datapoints_received`
|
||||
</td>
|
||||
<td>`Counter`</td>
|
||||
<td>The total number of datapoints received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode.</td>
|
||||
<td>
|
||||
|
||||
`query_key`, `scheduler_alias`, `preset`
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
[Back to metric sections](#metrics-generated-by-vmanomaly)
|
||||
|
||||
### Labelnames
|
||||
|
||||
@@ -537,3 +570,312 @@ Label names [description](#labelnames)
|
||||
* `url` - writer or reader url endpoint.
|
||||
* `code` - response status code or `connection_error`, `timeout`.
|
||||
* `step` - json or dataframe reading step.
|
||||
|
||||
[Back to metric sections](#metrics-generated-by-vmanomaly)
|
||||
|
||||
|
||||
## Logs generated by vmanomaly
|
||||
|
||||
The `vmanomaly` service logs operations, errors, and performance for its components (service, reader, writer), alongside [self-monitoring metrics](#metrics-generated-by-vmanomaly) updates. Below is a description of key logs for each component and the related metrics affected.
|
||||
|
||||
`{{X}}` indicates a placeholder in the log message templates described below, which will be replaced with the appropriate entity during logging.
|
||||
|
||||
|
||||
> **Note**: Applicable to version [v1.17.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1171) or newer.
|
||||
|
||||
> **Note**: By default, `vmanomaly` uses the `INFO` logging level. You can change this by specifying the `--loggerLevel` argument. See command-line arguments [here](https://docs.victoriametrics.com/anomaly-detection/quickstart/#command-line-arguments).
|
||||
|
||||
- [Startup logs](#startup-logs)
|
||||
- [Reader logs](#reader-logs)
|
||||
- [Service logs](#service-logs)
|
||||
- [Writer logs](#writer-logs)
|
||||
|
||||
|
||||
### Startup logs
|
||||
|
||||
The `vmanomaly` service logs important information during the startup process. This includes checking for the license, validating configurations, and setting up schedulers, readers, and writers. Below are key logs that are generated during startup, which can help troubleshoot issues with the service's initial configuration or license validation.
|
||||
|
||||
---
|
||||
|
||||
**License check**. If no license key or file is provided, the service will fail to start and log an error message. If a license file is provided but cannot be read, the service logs a failure. Log messages:
|
||||
|
||||
```text
|
||||
Please provide a license code using --license or --licenseFile arg, or as VM_LICENSE_FILE env. See https://victoriametrics.com/products/enterprise/trial/ to obtain a trial license.
|
||||
```
|
||||
|
||||
```text
|
||||
failed to read file {{args.license_file}}: {{error_message}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Config validation**. If the service's configuration fails to load or does not meet validation requirements, an error message is logged and the service will exit. If the configuration is loaded successfully, a message confirming the successful load is logged. Log messages:
|
||||
|
||||
```text
|
||||
Config validation failed, please fix these errors: {{error_details}}
|
||||
```
|
||||
|
||||
```text
|
||||
Config has been loaded successfully.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Model and data directory setup**. The service checks the environment variables `VMANOMALY_MODEL_DUMPS_DIR` and `VMANOMALY_DATA_DUMPS_DIR` to determine where to store models and data. If these variables are not set, models and data will be stored in memory. Please find the [on-disk mode details here](https://docs.victoriametrics.com/anomaly-detection/faq/#on-disk-mode). Log messages:
|
||||
|
||||
```text
|
||||
Using ENV MODEL_DUMP_DIR=`{{model_dump_dir}}` to store anomaly detection models.
|
||||
```
|
||||
```text
|
||||
ENV MODEL_DUMP_DIR is not set. Models will be kept in RAM between consecutive `fit` calls.
|
||||
```
|
||||
```text
|
||||
Using ENV DATA_DUMP_DIR=`{{data_dump_dir}}` to store anomaly detection data.
|
||||
```
|
||||
```text
|
||||
ENV DATA_DUMP_DIR is not set. Models' training data will be stored in RAM.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Scheduler and service initialization**. After configuration is successfully loaded, the service initializes [schedulers](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/) and services for each defined `scheduler_alias`. If there are issues with a specific scheduler (e.g., no models or queries found to attach to a scheduler), a warning is logged. When schedulers are initialized, the service logs a list of active schedulers. Log messages:
|
||||
|
||||
```text
|
||||
Scheduler {{scheduler_alias}} wrapped and initialized with {{N}} model spec(s).
|
||||
```
|
||||
```text
|
||||
No model spec(s) found for scheduler `{{scheduler_alias}}`, skipping setting it up.
|
||||
```
|
||||
```text
|
||||
Active schedulers: {{list_of_schedulers}}.
|
||||
```
|
||||
|
||||
[Back to logging sections](#logs-generated-by-vmanomaly)
|
||||
|
||||
---
|
||||
|
||||
### Reader logs
|
||||
|
||||
The `reader` component logs events during the process of querying VictoriaMetrics and retrieving the data necessary for anomaly detection. This includes making HTTP requests, handling SSL, parsing responses, and processing data into formats like DataFrames. The logs help to troubleshoot issues such as connection problems, timeout errors, or misconfigured queries.
|
||||
|
||||
---
|
||||
|
||||
**Starting a healthcheck request**. When the `reader` component initializes, it checks whether the VictoriaMetrics endpoint is accessible by sending a request for `_vmanomaly_healthcheck`. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Max points per timeseries set as: {{vm_max_datapoints_per_ts}}
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Reader endpoint SSL error {{url}}: {{error_message}}
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Reader endpoint inaccessible {{url}}: {{error_message}}
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Reader endpoint timeout {{url}}: {{error_message}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
**No data found (False)**. Based on [`query_from_last_seen_timestamp`](https://docs.victoriametrics.com/anomaly-detection/components/reader/?highlight=query_from_last_seen_timestamp#config-parameters) VmReader flag. A `warning` log is generated when no data is found in the requested range. This could indicate that the query was misconfigured or that no new data exists for the time period requested. Log message format:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] No data between {{start_s}} and {{end_s}} for query "{{query_key}}"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**No unseen data found (True)**. Based on [`query_from_last_seen_timestamp`](https://docs.victoriametrics.com/anomaly-detection/components/reader/?highlight=query_from_last_seen_timestamp#config-parameters) VmReader flag. A `warning` log is generated when no new data is returned (i.e., all data has already been seen in a previous inference step(s)). This helps in identifying situations where data for inference has already been processed. Based on VmReader's `adjust` flag. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] No unseen data between {{start_s}} and {{end_s}} for query "{{query_key}}"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Connection or timeout errors**. When the reader fails to retrieve data due to connection or timeout errors, a `warning` log is generated. These errors could result from network issues, incorrect query endpoints, or VictoriaMetrics being temporarily unavailable. Log message format:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Error querying {{query_key}} for {{url}}: {{error_message}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Max datapoints warning**. If the requested query range (defined by `fit_every` or `infer_every` [scheduler](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/#parameters-1) args) exceeds the maximum number of datapoints allowed by VictoriaMetrics, a `warning` log is generated, and the request is split into multiple intervals (option available since [v1.14.1](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1141)). This ensures that the request does not violate VictoriaMetrics’ constraints. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Query "{{query_key}}" from {{start_s}} to {{end_s}} with step {{step}} may exceed max datapoints per timeseries and will be split...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Multi-tenancy warnings**. If the reader detects any issues related to missing or misconfigured multi-tenancy labels (supported since [v1.16.2](https://docs.victoriametrics.com/anomaly-detection/changelog/index.html#v1162)), a `warning` log is generated to indicate the issue. See additional details [here](https://docs.victoriametrics.com/anomaly-detection/components/writer/#multitenancy-support). Log message format:
|
||||
|
||||
```text
|
||||
The label vm_account_id was not found in the label set of {{query_key}}, but tenant_id='multitenant' is set in reader configuration...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Metrics updated in read operations**. During successful query execution process, the following reader [self-monitoring metrics](#reader-behaviour-metrics) are updated:
|
||||
|
||||
- `vmanomaly_reader_request_duration_seconds`: Records the time (in seconds) taken to complete the query request.
|
||||
|
||||
- `vmanomaly_reader_responses`: Tracks the number of response codes received from VictoriaMetrics.
|
||||
|
||||
- `vmanomaly_reader_received_bytes`: Counts the number of bytes received in the response.
|
||||
|
||||
- `vmanomaly_reader_response_parsing_seconds`: Records the time spent parsing the response into different formats (e.g., JSON or DataFrame).
|
||||
|
||||
- `vmanomaly_reader_timeseries_received`: Tracks how many timeseries were retrieved in the query result.
|
||||
|
||||
- `vmanomaly_reader_datapoints_received`: Counts the number of datapoints retrieved in the query result.
|
||||
|
||||
---
|
||||
|
||||
**Metrics skipped in case of failures**. If an error occurs (connection or timeout), `vmanomaly_reader_received_bytes`, `vmanomaly_reader_timeseries_received`, and `vmanomaly_reader_datapoints_received` are not incremented because no valid data was received.
|
||||
|
||||
[Back to logging sections](#logs-generated-by-vmanomaly)
|
||||
|
||||
### Service logs
|
||||
|
||||
The `model` component (wrapped in service) logs operations during the fitting and inference stages for each model spec attached to particular [scheduler](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/) `scheduler_alias`. These logs inform about skipped runs, connection or timeout issues, invalid data points, and successful or failed model operations.
|
||||
|
||||
---
|
||||
|
||||
**Skipped runs**. When there are insufficient valid data points to fit or infer using a model, the run is skipped and a `warning` log is generated. This can occur when the query returns no new data or when the data contains invalid values (e.g., `NaN`, `INF`). The skipped run is also reflected in the `vmanomaly_model_runs_skipped` metric. Log messages:
|
||||
|
||||
When there are insufficient valid data points (at least 1 for [online models](https://docs.victoriametrics.com/anomaly-detection/components/models#online-models) and 2 for [offline models](https://docs.victoriametrics.com/anomaly-detection/components/models#offline-models))
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Skipping run for stage 'fit' for model '{{model_alias}}' (query_key: {{query_key}}): Not enough valid data to fit: {{valid_values_cnt}}
|
||||
```
|
||||
|
||||
When all the received timestamps during an `infer` call have already been processed, meaning the [`anomaly_score`](https://docs.victoriametrics.com/anomaly-detection/faq/index.html#what-is-anomaly-score) has already been produced for those points
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Skipping run for stage 'infer' for model '{{model_alias}}' (query_key: {{query_key}}): No unseen data to infer on.
|
||||
```
|
||||
When the model fails to produce any valid or finite outputs (such as [`anomaly_score`](https://docs.victoriametrics.com/anomaly-detection/faq/index.html#what-is-anomaly-score))
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Skipping run for stage 'infer' for model '{{model_alias}}' (query_key: {{query_key}}): No (valid) datapoints produced.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Errors during model execution**. If the model fails to fit or infer data due to internal service errors or model spec misconfigurations, an `error` log is generated and the error is also reflected in the `vmanomaly_model_run_errors` metric. This can occur during both `fit` and `infer` stages. Log messages:
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Error during stage 'fit' for model '{{model_alias}}' (query_key: {{query_key}}): {{error_message}}
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Error during stage 'infer' for model '{{model_alias}}' (query_key: {{query_key}}): {{error_message}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Model instance created during inference**. In cases where an [online model](https://docs.victoriametrics.com/anomaly-detection/components/models#online-models) instance is created during the inference stage (without a prior fit, a feature introduced in [v1.15.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1152)), a `debug` log is produced. This helps track models that are created dynamically based on incoming data. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Model instance '{{model_alias}}' created for '{{query_key}}' during inference.
|
||||
```
|
||||
---
|
||||
|
||||
**Successful model runs**. When a model successfully fits, logs track the number of valid datapoints processed and the time taken for the operation. These logs are accompanied by updates to [self-monitoring metrics](#models-behaviour-metrics) like `vmanomaly_model_runs`, `vmanomaly_model_run_duration_seconds`, `vmanomaly_model_datapoints_accepted`, and `vmanomaly_model_datapoints_produced`. Log messages:
|
||||
|
||||
For [non-rolling models](https://docs.victoriametrics.com/anomaly-detection/components/models/#non-rolling-models)
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Fitting on {{valid_values_cnt}}/{{total_values_cnt}} valid datapoints for "{{query_key}}" using model "{{model_alias}}".
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Model '{{model_alias}}' fit completed in {{model_run_duration}} seconds for {{query_key}}.
|
||||
```
|
||||
For [rolling models](https://docs.victoriametrics.com/anomaly-detection/components/models/#rolling-models) (combined stage)
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Fit-Infer on {{datapoint_count}} points for "{{query_key}}" using model "{{model_alias}}".
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Metrics updated in model runs**. During successful fit or infer operations, the following [self-monitoring metrics](#models-behaviour-metrics) are updated for each run:
|
||||
|
||||
- `vmanomaly_model_runs`: Tracks how many times the model ran (`fit`, `infer`, or `fit_infer`) for a specific `query_key`.
|
||||
|
||||
- `vmanomaly_model_run_duration_seconds`: Records the total time (in seconds) for the model invocation, based on the results of the `query_key`.
|
||||
|
||||
- `vmanomaly_model_datapoints_accepted`: The number of valid datapoints processed by the model during the run.
|
||||
|
||||
- `vmanomaly_model_datapoints_produced`: The number of datapoints generated by the model during inference.
|
||||
|
||||
- `vmanomaly_models_active`: Tracks the number of models currently **available for infer** for a specific `query_key`.
|
||||
|
||||
---
|
||||
|
||||
**Metrics skipped in case of failures**. If a model run fails due to an error or if no valid data is available, the metrics such as `vmanomaly_model_datapoints_accepted`, `vmanomaly_model_datapoints_produced`, and `vmanomaly_model_run_duration_seconds` are not updated.
|
||||
|
||||
---
|
||||
|
||||
[Back to logging sections](#logs-generated-by-vmanomaly)
|
||||
|
||||
### Writer logs
|
||||
|
||||
The `writer` component logs events during the process of sending produced data (like `anomaly_score` [metrics](https://docs.victoriametrics.com/anomaly-detection/faq/index.html#what-is-anomaly-score)) to VictoriaMetrics. This includes data preparation, serialization, and network requests to VictoriaMetrics endpoints. The logs can help identify issues in data transmission, such as connection errors, invalid data points, and track the performance of write requests.
|
||||
|
||||
---
|
||||
|
||||
**Starting a write request**. A `debug` level log is produced when the `writer` component starts the process of writing data to VictoriaMetrics. It includes details like the number of datapoints, bytes of payload, and the query being written. This is useful for tracking the payload size and performance at the start of the request. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] POST {{url}} with {{N}} datapoints, {{M}} bytes of payload, for {{query_key}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**No valid data points**. A `warning` log is generated if there are no valid datapoints to write (i.e., all are `NaN` or unsupported like `INF`). This indicates that the writer will not send any data to VictoriaMetrics. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] No valid datapoints to save for metric: {{query_key}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Connection, timeout, or I/O errors**. When the writer fails to send data due to connection, timeout, or I/O errors, an `error` log is generated. These errors often arise from network problems, incorrect URLs, or VictoriaMetrics being unavailable. The log includes details of the failed request and the reason for the failure. Log messages:
|
||||
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Cannot write {{N}} points for {{query_key}}: connection error {{url}} {{error_message}}
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Cannot write {{N}} points for {{query_key}}: timeout for {{url}} {{error_message}}
|
||||
```
|
||||
```text
|
||||
[Scheduler {{scheduler_alias}}] Cannot write {{N}} points for {{query_key}}: I/O error for {{url}} {{error_message}}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Multi-tenancy warnings**. If the `tenant_id` is set to `multitenant` but the `vm_account_id` label is missing from the query result, or vice versa, a `warning` log is produced (supported since [v1.16.2](https://docs.victoriametrics.com/anomaly-detection/changelog/index.html#v1162)). This helps in debugging label set issues that may occur due to the multi-tenant configuration - see [this section for details](https://docs.victoriametrics.com/anomaly-detection/components/writer/#multitenancy-support). Log messages:
|
||||
|
||||
```text
|
||||
The label vm_account_id was not found in the label set of {{query_key}}, but tenant_id='multitenant' is set in writer...
|
||||
```
|
||||
```text
|
||||
The label set for the metric {{query_key}} contains multi-tenancy labels, but the write endpoint is configured for single-tenant mode (tenant_id != 'multitenant')...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
**Metrics updated in write operations**. During the successful write process of *non-empty data*, the following [self-monitoring metrics](#writer-behaviour-metrics) are updated:
|
||||
|
||||
- `vmanomaly_writer_request_duration_seconds`: Records the time (in seconds) taken to complete the write request.
|
||||
|
||||
- `vmanomaly_writer_sent_bytes`: Tracks the number of bytes sent in the request.
|
||||
|
||||
- `vmanomaly_writer_responses`: Captures the HTTP response code returned by VictoriaMetrics. In case of connection, timeout, or I/O errors, a specific error code (`connection_error`, `timeout`, or `io_error`) is recorded instead.
|
||||
|
||||
- `vmanomaly_writer_request_serialize_seconds`: Records the time taken for data serialization.
|
||||
|
||||
- `vmanomaly_writer_datapoints_sent`: Counts the number of valid datapoints that were successfully sent.
|
||||
|
||||
- `vmanomaly_writer_timeseries_sent`: Tracks the number of timeseries sent to VictoriaMetrics.
|
||||
|
||||
**Metrics skipped in case of failures**. If an error occurs (connection, timeout, or I/O error), only `vmanomaly_writer_request_duration_seconds` is updated with appropriate error code.
|
||||
|
||||
[Back to logging sections](#logs-generated-by-vmanomaly)
|
||||
|
||||
@@ -385,7 +385,7 @@ services:
|
||||
restart: always
|
||||
vmanomaly:
|
||||
container_name: vmanomaly
|
||||
image: victoriametrics/vmanomaly:v1.17.1
|
||||
image: victoriametrics/vmanomaly:v1.17.2
|
||||
depends_on:
|
||||
- "victoriametrics"
|
||||
ports:
|
||||
|
||||
@@ -17,6 +17,10 @@ The sandbox cluster installation runs under the constant load generated by
|
||||
See also [LTS releases](https://docs.victoriametrics.com/lts-releases/).
|
||||
|
||||
## tip
|
||||
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert/): `-rule` cmd-line flag now supports multi-document YAML files. This could be useful when rules are retrieved via HTTP URL where multiple rule files were merged together in one response. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6753). Thanks to @Irene-123 for [the pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6995).
|
||||
* FEATURE: [stream aggregation](https://docs.victoriametrics.com/stream-aggregation/): disable input labels compression for outputs, that do not require it. This should improve memory usage and will help with labels compressor cleanup.
|
||||
|
||||
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert): properly set `group_name` and `file` fields for recording rules in `/api/v1/rules`.
|
||||
|
||||
## [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
@@ -24,7 +28,7 @@ Released at 2024-10-21
|
||||
|
||||
**Update note 1: `-search.maxUniqueTimeseries` limit on `vmselect` can no longer exceed `-search.maxUniqueTimeseries` limit on `vmstorage`. If you don't set this flag at `vmstorage`, then it will be automatically calculated based on available resources. This can result into rejecting expensive read queries if they exceed auto-calculated limit. The limit can be overriden by manually setting `-search.maxUniqueTimeseries` at vmstorage, but for better reliability we recommend sticking to default values. Refer to the CHANGELOG below and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6930).**
|
||||
|
||||
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent/) and [Single-node VictoriaMetrics](https://docs.victoriametrics.com/): add support of [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) ingested via [OpenTelemetry protocol for metrics](https://docs.victoriametrics.com/#sending-data-via-opentelemetry). Such histograms will be automatically converted to [VictoriaMetrics histogram format](https://valyala.medium.com/improving-histogram-usability-for-prometheus-and-grafana-bc7e5df0e350). See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6354).
|
||||
* FEATURE: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/) and [vmagent](https://docs.victoriametrics.com/vmagent/): add support of [exponential histograms](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) ingested via [OpenTelemetry protocol for metrics](https://docs.victoriametrics.com/#sending-data-via-opentelemetry). Such histograms will be automatically converted to [VictoriaMetrics histogram format](https://valyala.medium.com/improving-histogram-usability-for-prometheus-and-grafana-bc7e5df0e350). See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6354).
|
||||
* FEATURE: [Single-node VictoriaMetrics](https://docs.victoriametrics.com/) and `vmstorage` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): automatically set `-search.maxUniqueTimeseries` limit based on available memory and `-search.maxConcurrentRequests`. The more memory is available to the process and the lower is `-search.maxConcurrentRequests`, the higher will be `-search.maxUniqueTimeseries` limit. This should protect vmstorage from expensive queries without the need to manually set `-search.maxUniqueTimeseries`. The calculated limit will be printed during process start-up logs and exposed as `vm_search_max_unique_timeseries` metric. Set `-search.maxUniqueTimeseries` manually to override auto calculation. Please note, `-search.maxUniqueTimeseries` on vmselect can't exceed the same name limit on vmstorage, it can only be set to lower values. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6930).
|
||||
* FEATURE: [vmsingle](https://docs.victoriametrics.com/single-server-victoriametrics/), `vminsert` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/) and [vmagent](https://docs.victoriametrics.com/vmagent/): disable stream processing mode for data [ingested via InfluxDB](https://docs.victoriametrics.com/#how-to-send-data-from-influxdb-compatible-agents-such-as-telegraf) HTTP endpoints by default. With this change, the data is processed in batches (see `-influx.maxRequestSize`) and user will get parsing errors immediately as they happen. This also improves users' experience and resiliency against thundering herd problems caused by clients without backoff policies like telegraf. To enable stream mode back, pass HTTP header `Stream-Mode: "1"` with each request. For data sent via TCP and UDP (see `-influxListenAddr`) protocols streaming processing remains enabled.
|
||||
* FEATURE: `vmselect` in [VictoriaMetrics cluster](https://docs.victoriametrics.com/cluster-victoriametrics/): set default value for `-search.maxUniqueTimeseries` to `0`. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6930).
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
## Next release
|
||||
|
||||
- TODO
|
||||
- Added grafana dashboard. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1590)
|
||||
- Custom fluent-bit template to push data to multiple VLogs instances when replica count is greated than 1
|
||||
|
||||
## 0.6.6
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-logs-single)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
@@ -143,6 +143,69 @@ Change the values according to the need of the environment in ``victoria-logs-si
|
||||
<th class="helm-vars-description">Description</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>dashboards.annotations</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">{}
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Dashboard annotations</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dashboards.enabled</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Create VictoriaLogs dashboards</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dashboards.grafanaOperator.enabled</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dashboards.grafanaOperator.spec.allowCrossNamespaceImport</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dashboards.grafanaOperator.spec.instanceSelector.matchLabels.dashboards</td>
|
||||
<td>string</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">grafana
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>dashboards.labels</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">{}
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Dashboard labels</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>extraObjects</td>
|
||||
<td>list</td>
|
||||
@@ -175,26 +238,15 @@ Change the values according to the need of the environment in ``victoria-logs-si
|
||||
Nested_under kubernetes
|
||||
Add_prefix kubernetes_
|
||||
outputs: |
|
||||
[OUTPUT]
|
||||
Name http
|
||||
Match kube.*
|
||||
Host {{ include "victoria-logs.server.fullname" . }}
|
||||
port 9428
|
||||
compress gzip
|
||||
uri /insert/jsonline
|
||||
format json_lines
|
||||
json_date_format iso8601
|
||||
header AccountID 0
|
||||
header ProjectID 0
|
||||
header VL-Msg-Field log
|
||||
header VL-Time-Field date
|
||||
header VL-Stream-Fields stream,kubernetes_pod_name,kubernetes_container_name,kubernetes_namespace_name
|
||||
@INCLUDE /fluent-bit/etc/conf/vl/output_*.conf
|
||||
daemonSetVolumeMounts:
|
||||
- mountPath: /var/log
|
||||
name: varlog
|
||||
- mountPath: /var/lib/docker/containers
|
||||
name: varlibdockercontainers
|
||||
readOnly: true
|
||||
- mountPath: /fluent-bit/etc/conf/vl
|
||||
name: victorialogs-outputs
|
||||
daemonSetVolumes:
|
||||
- hostPath:
|
||||
path: /var/log
|
||||
@@ -202,6 +254,9 @@ daemonSetVolumes:
|
||||
- hostPath:
|
||||
path: /var/lib/docker/containers
|
||||
name: varlibdockercontainers
|
||||
- configMap:
|
||||
name: victorialogs-outputs
|
||||
name: victorialogs-outputs
|
||||
enabled: false
|
||||
resources: {}
|
||||
</code>
|
||||
@@ -241,20 +296,7 @@ resources: {}
|
||||
<td>tpl</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="tpl">
|
||||
<code class="language-yaml">fluent-bit.config.outputs: |
|
||||
[OUTPUT]
|
||||
Name http
|
||||
Match kube.*
|
||||
Host {{ include "victoria-logs.server.fullname" . }}
|
||||
port 9428
|
||||
compress gzip
|
||||
uri /insert/jsonline
|
||||
format json_lines
|
||||
json_date_format iso8601
|
||||
header AccountID 0
|
||||
header ProjectID 0
|
||||
header VL-Msg-Field log
|
||||
header VL-Time-Field date
|
||||
header VL-Stream-Fields stream,kubernetes_pod_name,kubernetes_container_name,kubernetes_namespace_name
|
||||
@INCLUDE /fluent-bit/etc/conf/vl/output_*.conf
|
||||
|
||||
</code>
|
||||
</pre>
|
||||
@@ -316,28 +358,6 @@ resources: {}
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Global name override</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>global.victoriaLogs.server.fullnameOverride</td>
|
||||
<td>string</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">null
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Overrides the full name of server component</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>global.victoriaLogs.server.name</td>
|
||||
<td>string</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">server
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Server container name</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.14.3
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.14.2
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-agent)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.12.3
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.12.2
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-alert)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 1.6.2
|
||||
|
||||
**Release date:** 2024-10-22
|
||||
|
||||

|
||||

|
||||
|
||||
- Upgraded [`vmanomaly`](https://docs.victoriametrics.com/anomaly-detection/) to [1.17.2](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1172)
|
||||
|
||||
## 1.6.1
|
||||
|
||||
**Release date:** 2024-10-18
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-anomaly)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
[](https://github.com/VictoriaMetrics/helm-charts/blob/master/LICENSE)
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.7.3
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.7.2
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-auth)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.14.6
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.14.5
|
||||
|
||||
**Release date:** 2024-10-18
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-cluster)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
## Next release
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.4.1
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- Human-readable error about Helm version requirement
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.4.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-distributed)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.5.3
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.5.2
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-gateway)
|
||||
[](https://slack.victoriametrics.com/)
|
||||
|
||||
|
||||
@@ -1,6 +1,23 @@
|
||||
## Next release
|
||||
|
||||
- Added alertmanager datasource. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1592)
|
||||
- Renamed `grafana.sidecar.dashboards.additionalDashboardLabels` to `defaultDashboards.labels`
|
||||
- Renamed `grafana.sidecar.dashboards.additionalDashboardAnnotations` to `defaultDashboards.annotations`
|
||||
- Renamed `grafana.sidecar.datasources.default` to `defaultDatasources.victoriametrics.datasources`
|
||||
- Renamed `grafana.additionalDataSources` to `defaultDatasources.extra`
|
||||
- Renamed `grafana.defaultDashboardsTimezone` to `defaultDashboards.defaultTimezone`
|
||||
- Removed `grafana.defaultDatasourceType` and default datasource type is picked from `defaultDatasources.victoriametrics.datasources[*].isDefault: true`
|
||||
- Removed crds subchart as it's now included in operator
|
||||
|
||||
## 0.27.6
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- Add an explicit fail in case both Grafana dashboard via sidecar and `grafana.dashboards` are enabled. Previously, this configuration would be accepted and sidecar configuration would silently override `.grafana.dashboards` configuration. See [these docs](https://docs.victoriametrics.com/helm/victoriametrics-k8s-stack/#adding-external-dashboards) for information about adding external dashboards.
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.27.5
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-k8s-stack)
|
||||
|
||||
Kubernetes monitoring on VictoriaMetrics stack. Includes VictoriaMetrics Operator, Grafana dashboards, ServiceScrapes and VMRules
|
||||
@@ -641,15 +641,14 @@ selectAllByDefault: true
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>crds</td>
|
||||
<td>defaultDashboards.annotations</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">enabled: true
|
||||
<code class="language-yaml">{}
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Install VM operator CRDs</p>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.dashboards</td>
|
||||
@@ -678,6 +677,16 @@ victoriametrics-vmalert:
|
||||
<td><p>In ArgoCD using client-side apply this dashboard reaches annotations size limit and causes k8s issues without server side apply See <a href="https://github.com/VictoriaMetrics/helm-charts/tree/disable-node-exporter-dashboard-by-default/charts/victoria-metrics-k8s-stack#metadataannotations-too-long-must-have-at-most-262144-bytes-on-dashboards" target="_blank">this issue</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.defaultTimezone</td>
|
||||
<td>string</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">utc
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.enabled</td>
|
||||
<td>bool</td>
|
||||
@@ -689,16 +698,6 @@ victoriametrics-vmalert:
|
||||
<td><p>Enable custom dashboards installation</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.grafanaOperator.allowCrossNamespaceImport</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.grafanaOperator.enabled</td>
|
||||
<td>bool</td>
|
||||
@@ -711,7 +710,17 @@ victoriametrics-vmalert:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.grafanaOperator.instanceSelector.matchLabels.dashboards</td>
|
||||
<td>defaultDashboards.grafanaOperator.spec.allowCrossNamespaceImport</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.grafanaOperator.spec.instanceSelector.matchLabels.dashboards</td>
|
||||
<td>string</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">grafana
|
||||
@@ -720,6 +729,81 @@ victoriametrics-vmalert:
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDashboards.labels</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">{}
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDatasources.alertmanager</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">datasources:
|
||||
- access: proxy
|
||||
jsonData:
|
||||
implementation: prometheus
|
||||
name: Alertmanager
|
||||
perReplica: false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>List of alertmanager datasources. Alertmanager generated <code>url</code> will be added to each datasource in template if alertmanager is enabled</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDatasources.alertmanager.perReplica</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Create per replica alertmanager compatible datasource</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDatasources.extra</td>
|
||||
<td>list</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">[]
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Configure additional grafana datasources (passed through tpl). Check <a href="http://docs.grafana.org/administration/provisioning/#datasources" target="_blank">here</a> for details</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDatasources.victoriametrics.datasources</td>
|
||||
<td>list</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">- isDefault: true
|
||||
name: VictoriaMetrics
|
||||
type: prometheus
|
||||
- isDefault: false
|
||||
name: VictoriaMetrics (DS)
|
||||
type: victoriametrics-datasource
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>List of prometheus compatible datasource configurations. VM <code>url</code> will be added to each of them in templates.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultDatasources.victoriametrics.perReplica</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Create per replica prometheus compatible datasource</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>defaultRules</td>
|
||||
<td>object</td>
|
||||
@@ -1221,10 +1305,7 @@ keyRef: {}
|
||||
<td>grafana</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">additionalDataSources: []
|
||||
defaultDashboardsTimezone: utc
|
||||
defaultDatasourceType: prometheus
|
||||
enabled: true
|
||||
<code class="language-yaml">enabled: true
|
||||
forceDeployDatasource: false
|
||||
ingress:
|
||||
annotations: {}
|
||||
@@ -1238,8 +1319,6 @@ ingress:
|
||||
tls: []
|
||||
sidecar:
|
||||
dashboards:
|
||||
additionalDashboardAnnotations: {}
|
||||
additionalDashboardLabels: {}
|
||||
defaultFolderName: default
|
||||
enabled: true
|
||||
folder: /var/lib/grafana/dashboards
|
||||
@@ -1248,13 +1327,6 @@ sidecar:
|
||||
name: default
|
||||
orgid: 1
|
||||
datasources:
|
||||
createVMReplicasDatasources: false
|
||||
default:
|
||||
- isDefault: true
|
||||
name: VictoriaMetrics
|
||||
- isDefault: false
|
||||
name: VictoriaMetrics (DS)
|
||||
type: victoriametrics-datasource
|
||||
enabled: true
|
||||
initDatasources: true
|
||||
vmScrape:
|
||||
@@ -1269,17 +1341,6 @@ vmScrape:
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Grafana dependency chart configuration. For possible values refer <a href="https://github.com/grafana/helm-charts/tree/main/charts/grafana#configuration" target="_blank">here</a></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>grafana.additionalDataSources</td>
|
||||
<td>list</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">[]
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Configure additional grafana datasources (passed through tpl). Check <a href="http://docs.grafana.org/administration/provisioning/#datasources" target="_blank">here</a> for details</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1302,21 +1363,6 @@ vmScrape:
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Extra paths to prepend to every host configuration. This is useful when working with annotation based services.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>grafana.sidecar.datasources.default</td>
|
||||
<td>list</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">- isDefault: true
|
||||
name: VictoriaMetrics
|
||||
- isDefault: false
|
||||
name: VictoriaMetrics (DS)
|
||||
type: victoriametrics-datasource
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>List of default prometheus compatible datasource configurations. VM <code>url</code> will be added to each of them in templates and <code>type</code> will be set to defaultDatasourceType if not defined</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -2114,13 +2160,13 @@ selector:
|
||||
<td>victoria-metrics-operator</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">crd:
|
||||
<code class="language-yaml">crds:
|
||||
cleanup:
|
||||
enabled: true
|
||||
image:
|
||||
pullPolicy: IfNotPresent
|
||||
repository: bitnami/kubectl
|
||||
create: false
|
||||
plain: true
|
||||
enabled: true
|
||||
operator:
|
||||
disable_prometheus_converter: false
|
||||
@@ -2130,6 +2176,17 @@ serviceMonitor:
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>VictoriaMetrics Operator dependency chart configuration. More values can be found <a href="https://docs.victoriametrics.com/helm/victoriametrics-operator#parameters" target="_blank">here</a>. Also checkout <a href="https://docs.victoriametrics.com/operator/vars" target="_blank">here</a> possible ENV variables to configure operator behaviour</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>victoria-metrics-operator.crds.plain</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">true
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>added temporary, till new operator version released</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.36.0
|
||||
|
||||
**Release date:** 2024-10-22
|
||||
|
||||

|
||||

|
||||
|
||||
- replaced `crd.enabled` property to `crds.plain`. Instead of disabling CRDs it selects if CRDs should be rendered from template or as plain CRDs
|
||||
|
||||
## 0.35.5
|
||||
|
||||
**Release date:** 2024-10-15
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-operator)
|
||||
|
||||
Victoria Metrics Operator
|
||||
@@ -311,7 +311,7 @@ issuer: {}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>crd.cleanup.enabled</td>
|
||||
<td>crds.cleanup.enabled</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">false
|
||||
@@ -322,7 +322,7 @@ issuer: {}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>crd.cleanup.image</td>
|
||||
<td>crds.cleanup.image</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">pullPolicy: IfNotPresent
|
||||
@@ -335,7 +335,7 @@ tag: ""
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>crd.cleanup.resources</td>
|
||||
<td>crds.cleanup.resources</td>
|
||||
<td>object</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
|
||||
<code class="language-yaml">limits:
|
||||
@@ -351,14 +351,14 @@ requests:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>crd.create</td>
|
||||
<td>crds.plain</td>
|
||||
<td>bool</td>
|
||||
<td><pre class="helm-vars-default-value" language-yaml" lang="">
|
||||
<code class="language-yaml">true
|
||||
<code class="language-yaml">false
|
||||
</code>
|
||||
</pre>
|
||||
</td>
|
||||
<td><p>Enables CRD creation and management. With this option, if you remove this chart, all CRD resources will be deleted with it.</p>
|
||||
<td><p>check if plain or templated CRDs should be created. with this option set to <code>false</code>, all CRDs will be rendered from templates. with this option set to <code>true</code>, all CRDs are immutable and require manual upgrade.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.12.3
|
||||
|
||||
**Release date:** 2024-10-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM components to [v1.105.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.105.0)
|
||||
|
||||
## 0.12.2
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
 
|
||||
 
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-single)
|
||||
|
||||
Victoria Metrics Single version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus
|
||||
|
||||
@@ -11,7 +11,13 @@ aliases:
|
||||
- /operator/changelog/index.html
|
||||
---
|
||||
|
||||
## [v0.48.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.4) - 15 Oct 2024
|
||||
|
||||
- [api](https://docs.victoriametrics.com/operator/api): adds new fields `maxDiskUsagePerUrl` and`forceVMProto` to the `VMagent` `remoteWriteSpec`
|
||||
- [vmuser](https://docs.victoriametrics.com/operator/resources/vmuser/): fixes the protocol of generated CRD target access url for vminsert and vmstorage when TLS is enabled.
|
||||
- [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): properly make transition to `statefulMode`. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1127) for details.
|
||||
- [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): properly assign `OwnerRefrence` for `Role` and `RoleBinding` at `single-namespace` operator mode.
|
||||
- [operator](https://docs.victoriametrics.com/operator/): fixes pod scheduling with `useStrictSecurity` enabled by removing default values for `AppArmorProfile` and `SeccompProfile`. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1120) for details.
|
||||
|
||||
## [v0.48.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.3) - 29 Sep 2024
|
||||
|
||||
|
||||
@@ -2518,8 +2518,10 @@ _Appears in:_
|
||||
| --- | --- | --- | --- |
|
||||
| `basicAuth` | BasicAuth allow an endpoint to authenticate over basic authentication | _[BasicAuth](#basicauth)_ | false |
|
||||
| `bearerTokenSecret` | Optional bearer auth token to use for -remoteWrite.url | _[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#secretkeyselector-v1-core)_ | false |
|
||||
| `forceVMProto` | ForceVMProto forces using VictoriaMetrics protocol for sending data to -remoteWrite.url | _boolean_ | false |
|
||||
| `headers` | Headers allow configuring custom http headers<br />Must be in form of semicolon separated header with value<br />e.g.<br />headerName: headerValue<br />vmagent supports since 1.79.0 version | _string array_ | false |
|
||||
| `inlineUrlRelabelConfig` | InlineUrlRelabelConfig defines relabeling config for remoteWriteURL, it can be defined at crd spec. | _[RelabelConfig](#relabelconfig) array_ | false |
|
||||
| `maxDiskUsage` | MaxDiskUsage defines the maximum file-based buffer size in bytes for -remoteWrite.url | _string_ | false |
|
||||
| `oauth2` | OAuth2 defines auth configuration | _[OAuth2](#oauth2)_ | false |
|
||||
| `sendTimeout` | Timeout for sending a single block of data to -remoteWrite.url (default 1m0s) | _string_ | false |
|
||||
| `streamAggrConfig` | StreamAggrConfig defines stream aggregation configuration for VMAgent for -remoteWrite.url | _[StreamAggrConfig](#streamaggrconfig)_ | false |
|
||||
|
||||
@@ -10,7 +10,7 @@ aliases:
|
||||
- /operator/vars/index.html
|
||||
---
|
||||
<!-- this doc autogenerated - don't edit it manually -->
|
||||
updated at Mon Oct 7 04:29:16 UTC 2024
|
||||
updated at Mon Oct 21 21:47:16 UTC 2024
|
||||
|
||||
|
||||
| variable name | variable default value | variable required | variable description |
|
||||
@@ -31,7 +31,7 @@ aliases:
|
||||
| VM_VLOGSDEFAULT_CONFIGRELOADERCPU | - | false | ignored |
|
||||
| VM_VLOGSDEFAULT_CONFIGRELOADERMEMORY | - | false | ignored |
|
||||
| VM_VMALERTDEFAULT_IMAGE | victoriametrics/vmalert | false | - |
|
||||
| VM_VMALERTDEFAULT_VERSION | v1.104.0 | false | - |
|
||||
| VM_VMALERTDEFAULT_VERSION | v1.105.0 | false | - |
|
||||
| VM_VMALERTDEFAULT_CONFIGRELOADIMAGE | jimmidyson/configmap-reload:v0.3.0 | false | - |
|
||||
| VM_VMALERTDEFAULT_PORT | 8080 | false | - |
|
||||
| VM_VMALERTDEFAULT_USEDEFAULTRESOURCES | true | false | - |
|
||||
@@ -42,7 +42,7 @@ aliases:
|
||||
| VM_VMALERTDEFAULT_CONFIGRELOADERCPU | 100m | false | - |
|
||||
| VM_VMALERTDEFAULT_CONFIGRELOADERMEMORY | 25Mi | false | - |
|
||||
| VM_VMAGENTDEFAULT_IMAGE | victoriametrics/vmagent | false | - |
|
||||
| VM_VMAGENTDEFAULT_VERSION | v1.104.0 | false | - |
|
||||
| VM_VMAGENTDEFAULT_VERSION | v1.105.0 | false | - |
|
||||
| VM_VMAGENTDEFAULT_CONFIGRELOADIMAGE | quay.io/prometheus-operator/prometheus-config-reloader:v0.68.0 | false | - |
|
||||
| VM_VMAGENTDEFAULT_PORT | 8429 | false | - |
|
||||
| VM_VMAGENTDEFAULT_USEDEFAULTRESOURCES | true | false | - |
|
||||
@@ -53,7 +53,7 @@ aliases:
|
||||
| VM_VMAGENTDEFAULT_CONFIGRELOADERCPU | 100m | false | - |
|
||||
| VM_VMAGENTDEFAULT_CONFIGRELOADERMEMORY | 25Mi | false | - |
|
||||
| VM_VMSINGLEDEFAULT_IMAGE | victoriametrics/victoria-metrics | false | - |
|
||||
| VM_VMSINGLEDEFAULT_VERSION | v1.104.0 | false | - |
|
||||
| VM_VMSINGLEDEFAULT_VERSION | v1.105.0 | false | - |
|
||||
| VM_VMSINGLEDEFAULT_CONFIGRELOADIMAGE | - | false | ignored |
|
||||
| VM_VMSINGLEDEFAULT_PORT | 8429 | false | - |
|
||||
| VM_VMSINGLEDEFAULT_USEDEFAULTRESOURCES | true | false | - |
|
||||
@@ -65,14 +65,14 @@ aliases:
|
||||
| VM_VMSINGLEDEFAULT_CONFIGRELOADERMEMORY | - | false | ignored |
|
||||
| VM_VMCLUSTERDEFAULT_USEDEFAULTRESOURCES | true | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_IMAGE | victoriametrics/vmselect | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_VERSION | v1.104.0-cluster | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_VERSION | v1.105.0-cluster | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_PORT | 8481 | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_LIMIT_MEM | 1000Mi | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_LIMIT_CPU | 500m | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_REQUEST_MEM | 500Mi | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSELECTDEFAULT_RESOURCE_REQUEST_CPU | 100m | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_IMAGE | victoriametrics/vmstorage | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VERSION | v1.104.0-cluster | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VERSION | v1.105.0-cluster | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VMINSERTPORT | 8400 | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_VMSELECTPORT | 8401 | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_PORT | 8482 | false | - |
|
||||
@@ -81,7 +81,7 @@ aliases:
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_RESOURCE_REQUEST_MEM | 500Mi | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMSTORAGEDEFAULT_RESOURCE_REQUEST_CPU | 250m | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_IMAGE | victoriametrics/vminsert | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_VERSION | v1.104.0-cluster | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_VERSION | v1.105.0-cluster | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_PORT | 8480 | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_RESOURCE_LIMIT_MEM | 500Mi | false | - |
|
||||
| VM_VMCLUSTERDEFAULT_VMINSERTDEFAULT_RESOURCE_LIMIT_CPU | 500m | false | - |
|
||||
@@ -100,7 +100,7 @@ aliases:
|
||||
| VM_VMALERTMANAGER_RESOURCE_REQUEST_CPU | 30m | false | - |
|
||||
| VM_DISABLESELFSERVICESCRAPECREATION | false | false | - |
|
||||
| VM_VMBACKUP_IMAGE | victoriametrics/vmbackupmanager | false | - |
|
||||
| VM_VMBACKUP_VERSION | v1.104.0-enterprise | false | - |
|
||||
| VM_VMBACKUP_VERSION | v1.105.0-enterprise | false | - |
|
||||
| VM_VMBACKUP_PORT | 8300 | false | - |
|
||||
| VM_VMBACKUP_USEDEFAULTRESOURCES | true | false | - |
|
||||
| VM_VMBACKUP_RESOURCE_LIMIT_MEM | 500Mi | false | - |
|
||||
@@ -108,7 +108,7 @@ aliases:
|
||||
| VM_VMBACKUP_RESOURCE_REQUEST_MEM | 200Mi | false | - |
|
||||
| VM_VMBACKUP_RESOURCE_REQUEST_CPU | 150m | false | - |
|
||||
| VM_VMAUTHDEFAULT_IMAGE | victoriametrics/vmauth | false | - |
|
||||
| VM_VMAUTHDEFAULT_VERSION | v1.104.0 | false | - |
|
||||
| VM_VMAUTHDEFAULT_VERSION | v1.105.0 | false | - |
|
||||
| VM_VMAUTHDEFAULT_CONFIGRELOADIMAGE | quay.io/prometheus-operator/prometheus-config-reloader:v0.68.0 | false | - |
|
||||
| VM_VMAUTHDEFAULT_PORT | 8427 | false | - |
|
||||
| VM_VMAUTHDEFAULT_USEDEFAULTRESOURCES | true | false | - |
|
||||
@@ -136,4 +136,4 @@ aliases:
|
||||
| VM_PODWAITREADYINTERVALCHECK | 5s | false | Defines poll interval for pods ready check at statefulset rollout update |
|
||||
| VM_FORCERESYNCINTERVAL | 60s | false | configures force resync interval for VMAgent, VMAlert, VMAlertmanager and VMAuth. |
|
||||
| VM_ENABLESTRICTSECURITY | false | false | EnableStrictSecurity will add default `securityContext` to pods and containers created by operator Default PodSecurityContext include: 1. RunAsNonRoot: true 2. RunAsUser/RunAsGroup/FSGroup: 65534 '65534' refers to 'nobody' in all the used default images like alpine, busybox. If you're using customize image, please make sure '65534' is a valid uid in there or specify SecurityContext. 3. FSGroupChangePolicy: &onRootMismatch If KubeVersion>=1.20, use `FSGroupChangePolicy="onRootMismatch"` to skip the recursive permission change when the root of the volume already has the correct permissions 4. SeccompProfile: type: RuntimeDefault Use `RuntimeDefault` seccomp profile by default, which is defined by the container runtime, instead of using the Unconfined (seccomp disabled) mode. Default container SecurityContext include: 1. AllowPrivilegeEscalation: false 2. ReadOnlyRootFilesystem: true 3. Capabilities: drop: - all turn off `EnableStrictSecurity` by default, see https://github.com/VictoriaMetrics/operator/issues/749 for details |
|
||||
[envconfig-sum]: 41649232efe6d908b9a973655bf62dd3
|
||||
[envconfig-sum]: f319004a92b62b1dad0c3e51323365dc
|
||||
@@ -1662,7 +1662,7 @@ It is safe sharing the collected profiles from security point of view, since the
|
||||
|
||||
`vmagent` can be fine-tuned with various command-line flags. Run `./vmagent -help` in order to see the full list of these flags with their descriptions and default values:
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
./vmagent -help
|
||||
|
||||
vmagent collects metrics data via popular data ingestion protocols and routes them to VictoriaMetrics.
|
||||
|
||||
@@ -1029,7 +1029,7 @@ command-line flags with their descriptions.
|
||||
|
||||
The shortlist of configuration flags is the following:
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
-clusterMode
|
||||
If clusterMode is enabled, then vmalert automatically adds the tenant specified in config groups to -datasource.url, -remoteWrite.url and -remoteRead.url. See https://docs.victoriametrics.com/vmalert/#multitenancy . This flag is available only in Enterprise binaries. See https://docs.victoriametrics.com/enterprise/
|
||||
-configCheckInterval duration
|
||||
@@ -1373,7 +1373,7 @@ The shortlist of configuration flags is the following:
|
||||
-remoteWrite.disablePathAppend
|
||||
Whether to disable automatic appending of '/api/v1/write' path to the configured -remoteWrite.url.
|
||||
-remoteWrite.flushInterval duration
|
||||
Defines interval of flushes to remote write endpoint (default 5s)
|
||||
Defines interval of flushes to remote write endpoint (default 2s)
|
||||
-remoteWrite.headers string
|
||||
Optional HTTP headers to send with each request to the corresponding -remoteWrite.url. For example, -remoteWrite.headers='My-Auth:foobar' would send 'My-Auth: foobar' HTTP header with every request to the corresponding -remoteWrite.url. Multiple headers must be delimited by '^^': -remoteWrite.headers='header1:value1^^header2:value2'
|
||||
-remoteWrite.idleConnTimeout duration
|
||||
|
||||
@@ -1170,7 +1170,7 @@ It is safe sharing the collected profiles from security point of view, since the
|
||||
|
||||
Pass `-help` command-line arg to `vmauth` in order to see all the configuration options:
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
./vmauth -help
|
||||
|
||||
vmauth authenticates and authorizes incoming requests and proxies them to VictoriaMetrics.
|
||||
|
||||
@@ -325,7 +325,7 @@ Refer to the respective documentation for your object storage provider for more
|
||||
|
||||
Run `vmbackup -help` in order to see all the available options:
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
-concurrency int
|
||||
The number of concurrent workers. Higher concurrency may reduce backup duration (default 10)
|
||||
-configFilePath string
|
||||
|
||||
@@ -270,7 +270,7 @@ Example usage for tokens issued by Google:
|
||||
|
||||
Below is the list of configuration flags (it can be viewed by running `./vmgateway -help`):
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
-auth.httpHeader string
|
||||
HTTP header name to look for JWT authorization token (default "Authorization")
|
||||
-auth.jwksEndpoints array
|
||||
|
||||
@@ -19,7 +19,7 @@ VictoriaMetrics must be stopped during the restore process.
|
||||
|
||||
Run the following command to restore backup from the given `-src` into the given `-storageDataPath`:
|
||||
|
||||
```sh
|
||||
```shellhelp
|
||||
./vmrestore -src=<storageType>://<path/to/backup> -storageDataPath=<local/path/to/restore>
|
||||
```
|
||||
|
||||
|
||||
@@ -1214,83 +1214,80 @@ func testStorageAddRows(rng *rand.Rand, s *Storage) error {
|
||||
}
|
||||
|
||||
func TestStorageRotateIndexDB(t *testing.T) {
|
||||
path := "TestStorageRotateIndexDB"
|
||||
s := MustOpenStorage(path, 0, 0, 0)
|
||||
defer testRemoveAll(t)
|
||||
|
||||
// Start indexDB rotater in a separate goroutine
|
||||
stopCh := make(chan struct{})
|
||||
rotateDoneCh := make(chan struct{})
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case <-stopCh:
|
||||
close(rotateDoneCh)
|
||||
return
|
||||
default:
|
||||
time.Sleep(time.Millisecond)
|
||||
s.mustRotateIndexDB(time.Now())
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// Run concurrent workers that insert / select data from the storage.
|
||||
ch := make(chan error, 3)
|
||||
for i := 0; i < cap(ch); i++ {
|
||||
go func(workerNum int) {
|
||||
ch <- testStorageAddMetrics(s, workerNum)
|
||||
}(i)
|
||||
const (
|
||||
numRotations = 4
|
||||
numWorkers = 10
|
||||
numRows = 10000
|
||||
)
|
||||
tr := TimeRange{
|
||||
MinTimestamp: time.Now().UTC().Add(-numRows * time.Hour).UnixMilli(),
|
||||
MaxTimestamp: time.Now().UTC().UnixMilli(),
|
||||
}
|
||||
for i := 0; i < cap(ch); i++ {
|
||||
select {
|
||||
case err := <-ch:
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
case <-time.After(10 * time.Second):
|
||||
t.Fatalf("timeout")
|
||||
s := MustOpenStorage(t.Name(), 0, 0, 0)
|
||||
defer s.MustClose()
|
||||
|
||||
insertAndRotateConcurrently := func(i int) (int, int) {
|
||||
var wg sync.WaitGroup
|
||||
for workerNum := range numWorkers {
|
||||
wg.Add(1)
|
||||
go func() {
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
rng := rand.New(rand.NewSource(1))
|
||||
prefix := fmt.Sprintf("metric_%d_%d", i, workerNum)
|
||||
mrs := testGenerateMetricRowsWithPrefix(rng, numRows, prefix, tr)
|
||||
s.AddRows(mrs, defaultPrecisionBits)
|
||||
wg.Done()
|
||||
}()
|
||||
}
|
||||
s.mustRotateIndexDB(time.Now())
|
||||
wg.Wait()
|
||||
s.DebugFlush()
|
||||
|
||||
idbCurr := s.idb()
|
||||
idbPrev := idbCurr.extDB
|
||||
isCurr := idbCurr.getIndexSearch(noDeadline)
|
||||
defer idbCurr.putIndexSearch(isCurr)
|
||||
isPrev := idbPrev.getIndexSearch(noDeadline)
|
||||
defer idbPrev.putIndexSearch(isPrev)
|
||||
|
||||
return testCountAllMetricNamesNoExtDB(isPrev, tr), testCountAllMetricNamesNoExtDB(isCurr, tr)
|
||||
}
|
||||
|
||||
close(stopCh)
|
||||
<-rotateDoneCh
|
||||
var oldCurr int
|
||||
for i := range numRotations {
|
||||
newPrev, newCurr := insertAndRotateConcurrently(i)
|
||||
|
||||
s.MustClose()
|
||||
if err := os.RemoveAll(path); err != nil {
|
||||
t.Fatalf("cannot remove %q: %s", path, err)
|
||||
var m Metrics
|
||||
s.UpdateMetrics(&m)
|
||||
if got, want := m.TableMetrics.TotalRowsCount(), uint64(numWorkers*numRows*(i+1)); got != want {
|
||||
t.Errorf("[rotation %d] unexpected row count: got %d, want %d", i, got, want)
|
||||
}
|
||||
|
||||
if got, want := newPrev-oldCurr+newCurr, numWorkers*numRows; got != want {
|
||||
t.Errorf("[rotation %d] unexpected metric count count: got (%d - %d) + %d = %d, want %d", i, newPrev, oldCurr, newCurr, got, want)
|
||||
}
|
||||
oldCurr = newCurr
|
||||
}
|
||||
}
|
||||
|
||||
func testStorageAddMetrics(s *Storage, workerNum int) error {
|
||||
rng := rand.New(rand.NewSource(1))
|
||||
const rowsCount = 1e3
|
||||
|
||||
var mn MetricName
|
||||
mn.Tags = []Tag{
|
||||
{[]byte("job"), []byte(fmt.Sprintf("webservice_%d", workerNum))},
|
||||
{[]byte("instance"), []byte("1.2.3.4")},
|
||||
func testCountAllMetricNamesNoExtDB(is *indexSearch, tr TimeRange) int {
|
||||
tfss := NewTagFilters()
|
||||
if err := tfss.Add([]byte("__name__"), []byte(".*"), false, true); err != nil {
|
||||
panic(fmt.Sprintf("unexpected error in TagFilters.Add: %v", err))
|
||||
}
|
||||
for i := 0; i < rowsCount; i++ {
|
||||
mn.MetricGroup = []byte(fmt.Sprintf("metric_%d_%d", workerNum, rng.Intn(10)))
|
||||
metricNameRaw := mn.marshalRaw(nil)
|
||||
timestamp := rng.Int63n(1e10)
|
||||
value := rng.NormFloat64() * 1e6
|
||||
|
||||
mr := MetricRow{
|
||||
MetricNameRaw: metricNameRaw,
|
||||
Timestamp: timestamp,
|
||||
Value: value,
|
||||
}
|
||||
s.AddRows([]MetricRow{mr}, defaultPrecisionBits)
|
||||
metricIDs, err := is.searchMetricIDs(nil, []*TagFilters{tfss}, tr, 1e9)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("searchMetricIDs failed unexpectedly: %v", err))
|
||||
}
|
||||
|
||||
// Verify the storage contains rows.
|
||||
minRowsExpected := uint64(rowsCount)
|
||||
var m Metrics
|
||||
s.UpdateMetrics(&m)
|
||||
if rowsCount := m.TableMetrics.TotalRowsCount(); rowsCount < minRowsExpected {
|
||||
return fmt.Errorf("expecting at least %d rows in the table; got %d", minRowsExpected, rowsCount)
|
||||
metricNames := map[string]bool{}
|
||||
var metricName []byte
|
||||
for _, metricID := range metricIDs {
|
||||
metricName, _ = is.searchMetricName(metricName[:0], metricID)
|
||||
metricNames[string(metricName)] = true
|
||||
}
|
||||
return nil
|
||||
return len(metricNames)
|
||||
}
|
||||
|
||||
func TestStorageDeleteStaleSnapshots(t *testing.T) {
|
||||
|
||||
@@ -65,7 +65,7 @@ func newBenchSamples(count int) []pushSample {
|
||||
Name: "app",
|
||||
Value: fmt.Sprintf("instance-%d", i),
|
||||
})
|
||||
keyBuf = compressLabels(keyBuf[:0], labels[:labelsLen], labels[labelsLen:])
|
||||
keyBuf = compressLabels(keyBuf[:0], labels[:labelsLen], labels[labelsLen:], true)
|
||||
sample.key = string(keyBuf)
|
||||
sample.value = float64(i)
|
||||
}
|
||||
|
||||
@@ -371,6 +371,7 @@ type aggregator struct {
|
||||
inputRelabeling *promrelabel.ParsedConfigs
|
||||
outputRelabeling *promrelabel.ParsedConfigs
|
||||
|
||||
needInputKey bool
|
||||
keepMetricNames bool
|
||||
ignoreOldSamples bool
|
||||
|
||||
@@ -554,13 +555,17 @@ func newAggregator(cfg *Config, path string, pushFunc PushFunc, ms *metrics.Set,
|
||||
return nil, fmt.Errorf("`outputs` list must contain at least a single entry from the list %s; "+
|
||||
"see https://docs.victoriametrics.com/stream-aggregation/", supportedOutputs)
|
||||
}
|
||||
needInputKey := false
|
||||
aggrOutputs := make([]aggrOutput, len(cfg.Outputs))
|
||||
outputsSeen := make(map[string]struct{}, len(cfg.Outputs))
|
||||
for i, output := range cfg.Outputs {
|
||||
as, err := newAggrState(output, outputsSeen, stalenessInterval)
|
||||
as, requireInputKey, err := newAggrState(output, outputsSeen, stalenessInterval)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !needInputKey && requireInputKey {
|
||||
needInputKey = requireInputKey
|
||||
}
|
||||
aggrOutputs[i] = aggrOutput{
|
||||
as: as,
|
||||
|
||||
@@ -586,6 +591,7 @@ func newAggregator(cfg *Config, path string, pushFunc PushFunc, ms *metrics.Set,
|
||||
inputRelabeling: inputRelabeling,
|
||||
outputRelabeling: outputRelabeling,
|
||||
|
||||
needInputKey: needInputKey,
|
||||
keepMetricNames: keepMetricNames,
|
||||
ignoreOldSamples: ignoreOldSamples,
|
||||
|
||||
@@ -614,6 +620,7 @@ func newAggregator(cfg *Config, path string, pushFunc PushFunc, ms *metrics.Set,
|
||||
}
|
||||
|
||||
if dedupInterval > 0 {
|
||||
a.needInputKey = true
|
||||
a.da = newDedupAggr()
|
||||
|
||||
_ = ms.NewGauge(fmt.Sprintf(`vm_streamaggr_dedup_state_size_bytes{%s}`, metricLabels), func() float64 {
|
||||
@@ -645,20 +652,20 @@ func newAggregator(cfg *Config, path string, pushFunc PushFunc, ms *metrics.Set,
|
||||
return a, nil
|
||||
}
|
||||
|
||||
func newAggrState(output string, outputsSeen map[string]struct{}, stalenessInterval time.Duration) (aggrState, error) {
|
||||
func newAggrState(output string, outputsSeen map[string]struct{}, stalenessInterval time.Duration) (aggrState, bool, error) {
|
||||
// check for duplicated output
|
||||
if _, ok := outputsSeen[output]; ok {
|
||||
return nil, fmt.Errorf("`outputs` list contains duplicate aggregation function: %s", output)
|
||||
return nil, false, fmt.Errorf("`outputs` list contains duplicate aggregation function: %s", output)
|
||||
}
|
||||
outputsSeen[output] = struct{}{}
|
||||
|
||||
if strings.HasPrefix(output, "quantiles(") {
|
||||
if !strings.HasSuffix(output, ")") {
|
||||
return nil, fmt.Errorf("missing closing brace for `quantiles()` output")
|
||||
return nil, false, fmt.Errorf("missing closing brace for `quantiles()` output")
|
||||
}
|
||||
argsStr := output[len("quantiles(") : len(output)-1]
|
||||
if len(argsStr) == 0 {
|
||||
return nil, fmt.Errorf("`quantiles()` must contain at least one phi")
|
||||
return nil, false, fmt.Errorf("`quantiles()` must contain at least one phi")
|
||||
}
|
||||
args := strings.Split(argsStr, ",")
|
||||
phis := make([]float64, len(args))
|
||||
@@ -666,57 +673,57 @@ func newAggrState(output string, outputsSeen map[string]struct{}, stalenessInter
|
||||
arg = strings.TrimSpace(arg)
|
||||
phi, err := strconv.ParseFloat(arg, 64)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot parse phi=%q for quantiles(%s): %w", arg, argsStr, err)
|
||||
return nil, false, fmt.Errorf("cannot parse phi=%q for quantiles(%s): %w", arg, argsStr, err)
|
||||
}
|
||||
if phi < 0 || phi > 1 {
|
||||
return nil, fmt.Errorf("phi inside quantiles(%s) must be in the range [0..1]; got %v", argsStr, phi)
|
||||
return nil, false, fmt.Errorf("phi inside quantiles(%s) must be in the range [0..1]; got %v", argsStr, phi)
|
||||
}
|
||||
phis[i] = phi
|
||||
}
|
||||
if _, ok := outputsSeen["quantiles"]; ok {
|
||||
return nil, fmt.Errorf("`outputs` list contains duplicated `quantiles()` function, please combine multiple phi* like `quantiles(0.5, 0.9)`")
|
||||
return nil, false, fmt.Errorf("`outputs` list contains duplicated `quantiles()` function, please combine multiple phi* like `quantiles(0.5, 0.9)`")
|
||||
}
|
||||
outputsSeen["quantiles"] = struct{}{}
|
||||
return newQuantilesAggrState(phis), nil
|
||||
return newQuantilesAggrState(phis), false, nil
|
||||
}
|
||||
|
||||
switch output {
|
||||
case "avg":
|
||||
return newAvgAggrState(), nil
|
||||
return newAvgAggrState(), false, nil
|
||||
case "count_samples":
|
||||
return newCountSamplesAggrState(), nil
|
||||
return newCountSamplesAggrState(), false, nil
|
||||
case "count_series":
|
||||
return newCountSeriesAggrState(), nil
|
||||
return newCountSeriesAggrState(), true, nil
|
||||
case "histogram_bucket":
|
||||
return newHistogramBucketAggrState(stalenessInterval), nil
|
||||
return newHistogramBucketAggrState(stalenessInterval), false, nil
|
||||
case "increase":
|
||||
return newTotalAggrState(stalenessInterval, true, true), nil
|
||||
return newTotalAggrState(stalenessInterval, true, true), true, nil
|
||||
case "increase_prometheus":
|
||||
return newTotalAggrState(stalenessInterval, true, false), nil
|
||||
return newTotalAggrState(stalenessInterval, true, false), true, nil
|
||||
case "last":
|
||||
return newLastAggrState(), nil
|
||||
return newLastAggrState(), false, nil
|
||||
case "max":
|
||||
return newMaxAggrState(), nil
|
||||
return newMaxAggrState(), false, nil
|
||||
case "min":
|
||||
return newMinAggrState(), nil
|
||||
return newMinAggrState(), false, nil
|
||||
case "rate_avg":
|
||||
return newRateAggrState(stalenessInterval, true), nil
|
||||
return newRateAggrState(stalenessInterval, true), true, nil
|
||||
case "rate_sum":
|
||||
return newRateAggrState(stalenessInterval, false), nil
|
||||
return newRateAggrState(stalenessInterval, false), true, nil
|
||||
case "stddev":
|
||||
return newStddevAggrState(), nil
|
||||
return newStddevAggrState(), false, nil
|
||||
case "stdvar":
|
||||
return newStdvarAggrState(), nil
|
||||
return newStdvarAggrState(), false, nil
|
||||
case "sum_samples":
|
||||
return newSumSamplesAggrState(), nil
|
||||
return newSumSamplesAggrState(), false, nil
|
||||
case "total":
|
||||
return newTotalAggrState(stalenessInterval, false, true), nil
|
||||
return newTotalAggrState(stalenessInterval, false, true), true, nil
|
||||
case "total_prometheus":
|
||||
return newTotalAggrState(stalenessInterval, false, false), nil
|
||||
return newTotalAggrState(stalenessInterval, false, false), true, nil
|
||||
case "unique_samples":
|
||||
return newUniqueSamplesAggrState(), nil
|
||||
return newUniqueSamplesAggrState(), false, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported output=%q; supported values: %s; see https://docs.victoriametrics.com/stream-aggregation/", output, supportedOutputs)
|
||||
return nil, false, fmt.Errorf("unsupported output=%q; supported values: %s; see https://docs.victoriametrics.com/stream-aggregation/", output, supportedOutputs)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -930,7 +937,7 @@ func (a *aggregator) Push(tss []prompbmarshal.TimeSeries, matchIdxs []byte) {
|
||||
}
|
||||
|
||||
bufLen := len(buf)
|
||||
buf = compressLabels(buf, inputLabels.Labels, outputLabels.Labels)
|
||||
buf = compressLabels(buf, inputLabels.Labels, outputLabels.Labels, a.needInputKey)
|
||||
// key remains valid only by the end of this function and can't be reused after
|
||||
// do not intern key because number of unique keys could be too high
|
||||
key := bytesutil.ToUnsafeString(buf[bufLen:])
|
||||
@@ -970,13 +977,15 @@ func (a *aggregator) Push(tss []prompbmarshal.TimeSeries, matchIdxs []byte) {
|
||||
}
|
||||
}
|
||||
|
||||
func compressLabels(dst []byte, inputLabels, outputLabels []prompbmarshal.Label) []byte {
|
||||
func compressLabels(dst []byte, inputLabels, outputLabels []prompbmarshal.Label, needInputKey bool) []byte {
|
||||
bb := bbPool.Get()
|
||||
bb.B = lc.Compress(bb.B, inputLabels)
|
||||
bb.B = lc.Compress(bb.B, outputLabels)
|
||||
dst = encoding.MarshalVarUint64(dst, uint64(len(bb.B)))
|
||||
dst = append(dst, bb.B...)
|
||||
bbPool.Put(bb)
|
||||
dst = lc.Compress(dst, outputLabels)
|
||||
if needInputKey {
|
||||
dst = lc.Compress(dst, inputLabels)
|
||||
}
|
||||
return dst
|
||||
}
|
||||
|
||||
@@ -986,24 +995,24 @@ func decompressLabels(dst []prompbmarshal.Label, key string) []prompbmarshal.Lab
|
||||
|
||||
func getOutputKey(key string) string {
|
||||
src := bytesutil.ToUnsafeBytes(key)
|
||||
inputKeyLen, nSize := encoding.UnmarshalVarUint64(src)
|
||||
outputKeyLen, nSize := encoding.UnmarshalVarUint64(src)
|
||||
if nSize <= 0 {
|
||||
logger.Panicf("BUG: cannot unmarshal inputKeyLen from uvarint")
|
||||
logger.Panicf("BUG: cannot unmarshal outputKeyLen from uvarint")
|
||||
}
|
||||
src = src[nSize:]
|
||||
outputKey := src[inputKeyLen:]
|
||||
outputKey := src[:outputKeyLen]
|
||||
return bytesutil.ToUnsafeString(outputKey)
|
||||
}
|
||||
|
||||
func getInputOutputKey(key string) (string, string) {
|
||||
src := bytesutil.ToUnsafeBytes(key)
|
||||
inputKeyLen, nSize := encoding.UnmarshalVarUint64(src)
|
||||
outputKeyLen, nSize := encoding.UnmarshalVarUint64(src)
|
||||
if nSize <= 0 {
|
||||
logger.Panicf("BUG: cannot unmarshal inputKeyLen from uvarint")
|
||||
logger.Panicf("BUG: cannot unmarshal outputKeyLen from uvarint")
|
||||
}
|
||||
src = src[nSize:]
|
||||
inputKey := src[:inputKeyLen]
|
||||
outputKey := src[inputKeyLen:]
|
||||
outputKey := src[:outputKeyLen]
|
||||
inputKey := src[outputKeyLen:]
|
||||
return bytesutil.ToUnsafeString(inputKey), bytesutil.ToUnsafeString(outputKey)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user