Commit graph

526 commits

Author SHA1 Message Date
Aliaksandr Valialkin
262932f517
vendor: update github.com/VictoriaMetrics/metricsql from v0.60.0 to v0.61.1
This adds support for passing durations via WITH template vars:

- `WITH (w = 5m) m[w]` is transformed to `m[5m]`
- `WITH (f(w, step, off) = m[w:step] offset off) f(5m, 10s, 1h)` is transformed to `m[5m:10s] offset 1h`

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4025
Updates https://github.com/VictoriaMetrics/metricsql/issues/12

See also the initial implementation by @lujiajing1126 at https://github.com/VictoriaMetrics/metricsql/pull/13
2023-07-19 14:59:46 -07:00
Aliaksandr Valialkin
1f83e2d0cf
vendor: update github.com/VictoriaMetrics/metricsql from v0.59.1 to v0.60.0
This update adds support for metricsql.Prettify() function, which is going to be used
for prettifying long MetricsQL queries in VMUI
2023-07-18 19:19:14 -07:00
Aliaksandr Valialkin
bf17424245
vendor: make vendor-update 2023-07-18 16:13:52 -07:00
Aliaksandr Valialkin
2a845e2acf
properly encode the right part of binary operation if it starts with prefix series selector 2023-07-18 16:00:07 -07:00
Aliaksandr Valialkin
8815080030
app/vmselect/promql: add the ability to copy all the labels from one side of group_left()/group_right() operation
This is performed by specifying `*` inside group_left()/group_right().
Also allow specifying prefix for the copied labels via `group_left(...) prefix "..."` and `group_right(...) prefix "..."` syntax.
For example, the following query adds all the namespace-related labels to pod info, and prefixes all the copied label names with "ns_" prefix:

  kube_pod_info * on(namespace) group_left(*) prefix "ns_" kube_namespace_labels

This resolves the following StackOverflow questions:

- https://stackoverflow.com/questions/76661818/how-to-add-namespace-labels-to-pod-labels-in-prometheus
- https://stackoverflow.com/questions/76653997/how-can-i-make-a-new-copy-of-kube-namespace-labels-metric-with-a-different-name
2023-07-17 19:07:39 -07:00
dependabot[bot]
d4ea5d1cc0
build(deps): bump github.com/cheggaaa/pb/v3 from 3.1.3 to 3.1.4 (#4645)
Bumps [github.com/cheggaaa/pb/v3](https://github.com/cheggaaa/pb) from 3.1.3 to 3.1.4.
- [Commits](https://github.com/cheggaaa/pb/compare/v3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: github.com/cheggaaa/pb/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-17 11:51:56 +02:00
Aliaksandr Valialkin
be31bdc88c
app/vmselect/promql: recommend to use (a op b) keep_metric_names instead of a op b keep_metric_names
The `a op b keep_metric_names` is ambigouos to `a op (b keep_metric_names)` when `b` is a transform or rollup function.
For example, `a + rate(b) keep_metric_names`. So it is better to use more clear syntax: `(a op b) keep_metric_names`

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3710
2023-07-16 23:46:34 -07:00
Zakhar Bessarab
e2367b6d1c
metricsql: add support of using keep_metric_names for binary operations (#4109)
* metricsql: add support of using keep_metric_names for binary operations

This should help to avoid confusion with queries like one in the issue #3710.

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

* wip

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-07-16 03:00:39 -07:00
Aliaksandr Valialkin
4cb024d8a3
all: add support for or filters in series selectors
This commit adds ability to select series matching distinct filters via a single series selector.
For example, the following selector selects series with either {env="prod",job="a"}
or {env="dev",job="b"} labels:

  {env="prod",job="a" or env="dev",job="b"}

The `or` filter is supported in all the VictoriaMetrics tools now.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3997
Uses https://github.com/VictoriaMetrics/metricsql/pull/14
2023-07-16 00:06:33 -07:00
Dmytro Kozlov
177a0c1ca9
app/vmctl: fix issue with adding many seconds (#4617)
* app/vmctl: fix issue with adding many seconds

* app/vmagent: add CHANGELOG.md
2023-07-13 17:11:48 +02:00
Aliaksandr Valialkin
1df3e548c1
vendor: run make vendor-update 2023-07-07 00:04:32 -07:00
Aliaksandr Valialkin
b6dda0fefe
vendor: make vendor-update 2023-05-18 12:22:09 -07:00
Aliaksandr Valialkin
664db964ca
vendor: update github.com/VictoriaMetrics/metrics from v1.23.1 to v1.24.0
This change adds process_* metrics to VictoriaMetrics components under Windows OS

See https://github.com/VictoriaMetrics/metrics/pull/47
2023-05-16 11:37:07 -07:00
Aliaksandr Valialkin
c8799a5d97
vendor: update github.com/valyala/gozstd from v1.19.1 to v1.20.1 2023-05-10 02:16:08 -07:00
Aliaksandr Valialkin
9eb1abdefe
vendor: make vendor-update 2023-05-09 23:13:50 -07:00
Zakhar Bessarab
b21a55febf
app/vmalert: add support of recursive path globs for rules and templates (#4148)
Supports using `**` for `-rule` and `-rule.templates`: `dir/**/*.tpl` loads contents of dir and all subdirectories recursively.

See: #4041

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Co-authored-by: Artem Navoiev <tenmozes@gmail.com>
Co-authored-by: Nikolay <nik@victoriametrics.com>
2023-04-26 19:20:22 +02:00
Aliaksandr Valialkin
4b43c91f8c
vendor: update github.com/VictoriaMetrics/metricsql from v0.56.1 to v0.56.2
This fixes panic when the duration in the query contains `M` suffix.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4120
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3589
2023-04-14 14:05:56 -07:00
Aliaksandr Valialkin
b9ab07ced9
vendor: update github.com/valyala/gozstd from v1.19.0 to v1.19.1 2023-04-10 11:30:13 -07:00
Aliaksandr Valialkin
b7cce552da
vendor: make vendor-update 2023-04-10 10:20:54 -07:00
Aliaksandr Valialkin
4725549cb2
vendor: update github.com/klauspost/compress from v1.16.3 to v1.16.4
See https://github.com/klauspost/compress/releases/tag/v1.16.4
2023-04-05 21:25:35 -07:00
Aliaksandr Valialkin
29a692f278
vendor: update github.com/valyala/gozstd from v1.18.0 to v1.19.0 2023-04-05 20:53:30 -07:00
Aliaksandr Valialkin
02b714c110
vendor: make vendor-update 2023-03-31 23:59:34 -07:00
Aliaksandr Valialkin
9e02b3d48a
vendor: make vendor-update 2023-03-27 15:28:02 -07:00
Aliaksandr Valialkin
25446a7933
vendor: run make vendor-update 2023-03-24 18:08:06 -07:00
Aliaksandr Valialkin
ddbbc9a86d
vendor: make vendor-update 2023-03-15 13:24:12 -07:00
Aliaksandr Valialkin
a11ac9648c
vendor: make vendor-update 2023-03-14 16:19:43 -07:00
Aliaksandr Valialkin
90e1818068
vendor: update github.com/klauspost/compress from v1.16.0 to v1.16.3 2023-03-14 16:14:25 -07:00
Aliaksandr Valialkin
c28c25ed2e
vendor: make vendor-update 2023-03-12 03:13:53 -07:00
Aliaksandr Valialkin
8937de5f99
vendor: make vendor-update 2023-02-27 15:32:45 -08:00
Aliaksandr Valialkin
1a6f2f07fd
lib/httpserver: use github.com/klauspost/compress/gzhttp for compressing http responses
This allows removing gzip-related code from lib/httpserver.
2023-02-27 10:33:43 -08:00
Aliaksandr Valialkin
8cfe4064b5
vendor: make vendor-update 2023-02-24 17:26:51 -08:00
Aliaksandr Valialkin
836d56876a
vendor: make vendor-update 2023-02-21 18:06:20 -08:00
Aliaksandr Valialkin
d59dc7616d
go.mod: update github.com/VictoriaMetrics/fastcache from v1.12.0 to v1.12.1 2023-02-21 17:51:41 -08:00
Aliaksandr Valialkin
ffebc20f6d
vendor: update github.com/VictoriaMetrics/fasthttp from v1.1.0 to v1.2.0
The v1.2.0 adds HostClient.DoCtx() function, which is needed by https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3747
for implementing fast canceling of pending requests to scrape targets on config update
2023-02-21 17:49:30 -08:00
Aliaksandr Valialkin
2cea923ff7
app/vmselect/promql: add share(q) aggregate function for normalizing results across multiple time series in [0..1] value range per each timestamp and aggregation group 2023-02-18 22:42:01 -08:00
Aliaksandr Valialkin
c86f1f1d1b
app/vmselect/promql: add range_zscore(q) and range_trim_zscore(z, q) functions
These functions may be useful for dropping outliers at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3759
2023-02-18 22:41:59 -08:00
Aliaksandr Valialkin
1030be91ae
vendor: make vendor-update 2023-02-18 15:36:41 -08:00
Aliaksandr Valialkin
406822a16c
app/vmselect/promql: add range_mad(q) and range_trim_outliers(k, q) functions
These functions may help trimming outliers during query time
for the use case described at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3759
2023-02-18 15:19:10 -08:00
Aliaksandr Valialkin
c8467f37a9
vendor: update github.com/valyala/gozstd from v1.17.0 to v1.18.0 2023-02-18 15:19:10 -08:00
Aliaksandr Valialkin
5123a61be9
vendor: make vendor-update 2023-02-13 11:14:17 -08:00
Aliaksandr Valialkin
b11bdc46be
app/vmselect/promql: add mad_over_time(m[d]) function
See https://github.com/prometheus/prometheus/issues/5514
2023-02-11 01:06:20 -08:00
Aliaksandr Valialkin
291c41978e
vendor: make vendor-update 2023-02-09 14:48:16 -08:00
Aliaksandr Valialkin
c9d2934bb4
vendor: make vendor-update 2023-02-08 08:55:14 -08:00
Aliaksandr Valialkin
607b542222
vendor: make vendor-update 2023-02-01 12:23:23 -08:00
Aliaksandr Valialkin
080a3e2396
vendor: make vendor-update 2023-01-31 11:03:20 -08:00
Aliaksandr Valialkin
6a7faf9f22
vendor: make vendor-update 2023-01-27 15:57:38 -08:00
Aliaksandr Valialkin
a7f8ce5e3d
vendor: make vendor-update 2023-01-23 08:05:54 -08:00
Aliaksandr Valialkin
006af394ff
vendor: update github.com/VictoriaMetrics/metricsql from v0.51.1 to v0.51.2
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3664
2023-01-17 11:26:41 -08:00
Aliaksandr Valialkin
094ae82df5
vendor: make vendor-update 2023-01-15 14:16:34 -08:00
Aliaksandr Valialkin
092e2c8f2d
github.com/VictoriaMetrics/metrics: update from v1.23.0 to v1.23.1
See https://github.com/VictoriaMetrics/metrics/issues/42
2023-01-15 14:06:43 -08:00
Aliaksandr Valialkin
4faf7ea41e
vendor: make vendor-update 2023-01-10 18:58:34 -08:00
Aliaksandr Valialkin
67ab49baa9
vendor: make vendor-update 2023-01-09 21:34:34 -08:00
Aliaksandr Valialkin
04dff34de4
vendor: update github.com/VictoriaMetrics/metricsql from v0.50.0 to v0.51.0
Updates https://github.com/VictoriaMetrics/metricsql/pull/7
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3589
2023-01-05 01:50:10 -08:00
Aliaksandr Valialkin
fafece1af8
vendor: make vendor-update 2023-01-03 23:36:42 -08:00
Aliaksandr Valialkin
c90752a8be
vendor: update github.com/valyala/fastjson/fastfloat from v1.6.3 to v1.6.4
This should properly parse floating-point numbers with missing integer or fractional parts.
For example, 123. or .123

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3544
2022-12-29 10:34:11 -08:00
Aliaksandr Valialkin
3d082ed6db
vendor: make vendor-update 2022-12-28 15:00:02 -08:00
Aliaksandr Valialkin
9a0308ab32
vendor: make vendor-update 2022-12-19 13:08:13 -08:00
Aliaksandr Valialkin
09a70d3e90
vendor: make vendor-update 2022-12-14 12:13:54 -08:00
Aliaksandr Valialkin
4a4b3c2462
vendor: update github.com/klauspost/compress from v1.15.12 to v1.15.13 2022-12-11 02:10:51 -08:00
Aliaksandr Valialkin
19f20c0f4e
vendor: make vendor-update 2022-12-10 21:46:16 -08:00
Aliaksandr Valialkin
06758650bf
vendor: make vendor-update 2022-12-05 23:28:14 -08:00
Aliaksandr Valialkin
5eae9a9914
app/vmselect/promql: add range_trim_spikes(phi, q) function for trimming phi percent of largest spikes per each time series returned by q 2022-12-05 21:55:01 -08:00
Aliaksandr Valialkin
e509552e92
vendor: make vendor-update 2022-12-05 01:01:57 -08:00
Aliaksandr Valialkin
c7ce4979ec
all: follow-up after 05cf8a6ecc 2022-11-29 21:03:59 -08:00
Dmytro Kozlov
05cf8a6ecc
vmctl: support of the remote read protocol (#3232)
vmctl: support of the remote read protocol

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: hagen1778 <roman@victoriametrics.com>
2022-11-29 22:53:28 +01:00
Aliaksandr Valialkin
e2a061b6a3
vendor: make vendor-update 2022-11-25 19:52:00 -08:00
Aliaksandr Valialkin
633ad34eb7
vendor: make vendor-update 2022-11-22 11:26:16 +02:00
Aliaksandr Valialkin
d9c3a2b605
app/vmselect/promql: add range_normalize(q1, ..., qN) function for normalizing query results into [0..1] value range
This may be useful for analyzing correlation between time series with different value ranges
2022-11-21 23:25:00 +02:00
Aliaksandr Valialkin
05ed98c98b
app/vmselect/promql: allow using SI and IEC suffixes in numeric values inside queries
For example, 10Ki is equivalent to 10*1024, while 5.3M is equivalent to 5.3*1000*1000
2022-11-21 21:27:55 +02:00
Aliaksandr Valialkin
2c9017f6df
vendor: make vendor-update 2022-11-17 01:38:29 +02:00
Aliaksandr Valialkin
a260e2659e
app/vmselect/promql: add range_stdvar() and range_stddev() functions for calculating variance and deviation over time series on the selected time range 2022-11-17 01:03:40 +02:00
Aliaksandr Valialkin
c1a3192d8b
app/vmselect/promql: add range_linear_regression(q) function for calculating simple linear regression for the selected time series on the selected time range 2022-11-17 00:38:48 +02:00
Aliaksandr Valialkin
2bcafbef25
vendor: make vendor-update 2022-11-10 13:46:33 +02:00
Aliaksandr Valialkin
8332622037
vendor: update github.com/urfave/cli/v2 from v2.23.2 to v2.23.4 2022-11-07 14:58:35 +02:00
Aliaksandr Valialkin
63d4cf661b
vendor: make vendor-update 2022-11-05 10:34:35 +02:00
Aliaksandr Valialkin
a3dc324b19
vendor: update github.com/urfave/cli/v2 from 2.20.3 to 2.23.0 2022-11-01 10:46:26 +02:00
Aliaksandr Valialkin
6ac7b088b2
vendor: make vendor-update 2022-10-29 02:53:48 +03:00
Aliaksandr Valialkin
ad76a54c87
vendor: make vendor-update 2022-10-28 00:18:15 +03:00
Aliaksandr Valialkin
75e22ed3a4
vendor: make vendor-update 2022-10-27 20:21:13 +03:00
Aliaksandr Valialkin
d9bbf24183
app/{vminsert,vmselect}/netstorage: allow calling Init()+MustStop() in a loop
Previously netstorage.MustStop() call didn't free up all the resources,
so the subsequent call to nestorage.Init() would panic.

This allows writing tests, which call nestorage.Init() + nestorage.MustStop() in a loop.
2022-10-25 17:47:17 +03:00
Aliaksandr Valialkin
692af2d17c
vendor: make vendor-update 2022-10-24 15:47:01 +03:00
Aliaksandr Valialkin
b4f7243110
vendor: make vendor-update 2022-10-18 10:56:38 +03:00
Aliaksandr Valialkin
069401a304
all: log error when environment variables referred from -promscrape.config are missing
This should prevent from using incorrect config files
2022-10-18 10:47:16 +03:00
Aliaksandr Valialkin
2b2c58ecf8
vendor: make vendor-update 2022-10-14 15:16:03 +03:00
Aliaksandr Valialkin
b7887c426b
vendor: make vendor-update 2022-10-10 22:03:45 +03:00
Aliaksandr Valialkin
0cea525456
vendor: make vendor-update 2022-10-07 01:01:21 +03:00
Zakhar Bessarab
262ce77e2d
lib/backup: add support of Azure Blob Storage (#460)
* lib/backup: add support of Azure Blob Storage

* lib/backup: add enterprise support of Azure Blob Storage
2022-10-06 00:32:46 +03:00
Aliaksandr Valialkin
366f04001b
vendor: make vendor-update 2022-10-01 17:20:11 +03:00
Zakhar Bessarab
87c77727e4
vmbackup: update AWS SDK to v2 (#3174)
* lib/backup/s3remote: update AWS SDK to v2

* Update lib/backup/s3remote/s3.go

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>

* lib/backup/s3remote: refactor error handling

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-10-01 17:12:07 +03:00
Aliaksandr Valialkin
1bac96dfce
vendor: make vendor-update 2022-09-26 15:44:55 +03:00
Aliaksandr Valialkin
dc4b87621f
vendor: make vendor-update 2022-09-21 11:54:32 +03:00
Dmytro Kozlov
6a794ec5d5
app/{vmctl,vmalert}: update progress bar library (make vendor-update) (#3138)
* app/{vmctl,vmalert}: update progress bar library (make vendor-update)

* app/{vmctl,vmalert}: make vendor-update
2022-09-21 11:08:33 +03:00
Aliaksandr Valialkin
310d0caec2
vendor: make vendor-update 2022-09-19 15:12:22 +03:00
Aliaksandr Valialkin
2b55d167d7
app/vmagent/remotewrite: add benchmarks for comparing the performance of standard Snappy encoder with github.com/klauspost/compress/s2 encoder
The standard Snappy encoder from github.com/golang/snappy shows quite good performance number
for compressing the Prometheus remote_write proto messages according to the added benchmarks,
so there is no need in switching to github.com/klauspost/compress/s2 yet.
2022-09-19 14:28:09 +03:00
Dmytro Kozlov
b75f1854c5
vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982)
* vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric)

* vmselect/promql: fix tests, add documentation

* vmselect/promql: update test

* vmselect/promql: update for alphanumeric sorting, fix tests

* vmselect/promql: remove comments

* vmselect/promql: cleanup

* vmselect/promql: avoid memory allocations, update functions descriptions

* vmselect/promql: make linter happy (remove ineffectual assigment)

* vmselect/promql: add test case, fix behavior when strings are equal

* vendor: update github.com/VictoriaMetrics/metricsql from v0.44.1 to v0.45.0

this adds support for sort_by_label_numeric and sort_by_label_numeric_desc functions

* wip

* lib/promscrape: read response body into memory in stream parsing mode before parsing it

This reduces scrape duration for targets returning big responses.

The response body was already read into memory in stream parsing mode before this change,
so this commit shouldn't increase memory usage.

* wip

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-09-14 17:41:09 +03:00
Aliaksandr Valialkin
523ff25077
vendor: make vendor-update 2022-09-13 16:44:44 +03:00
Aliaksandr Valialkin
7c2fa1bc48
vendor: make vendor-update 2022-09-08 18:51:49 +03:00
Aliaksandr Valialkin
9a1ede0977
vendor: make vendor-update 2022-09-02 21:42:41 +03:00
Aliaksandr Valialkin
6ba93bf2dc
vendor: make vendor-update 2022-08-30 09:45:26 +03:00
Aliaksandr Valialkin
278481f71d
vendor: make vendor-update 2022-08-21 19:06:28 +03:00