Commit Graph

544 Commits

Author SHA1 Message Date
Aliaksandr Valialkin
da24c129db
vendor: run make vendor-update 2023-11-02 21:01:21 +01:00
Aliaksandr Valialkin
ea81f6fc36
app/vmselect/promql: add outliers_iqr(q) and outlier_iqr_over_time(m[d]) functions
These functions allow detecting anomalies in series and samples using Interquartile range method.
See Outliers section at https://en.wikipedia.org/wiki/Interquartile_range for more details.
2023-10-31 22:10:31 +01:00
Aliaksandr Valialkin
fba93dbe0b
vendor: run make vendor-update 2023-10-31 20:19:51 +01:00
Aliaksandr Valialkin
da77f4deeb
app/vmselect/promql: add labels_equal(q, "label1", "label2", ...) function
This function returns q series, which have identical values for the listed labels
"label1", "label2", ...

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5148
2023-10-16 21:50:11 +02:00
Aliaksandr Valialkin
bdb743c88d
app/vmselect/promql: add drop_empty_series() function for dropping empty series before performing additional calculations
This can be useful in the following queries:

   drop_empty_series(temperature <= 30) default 40

This query drops temperature series with all the values bigger than 30 on the selected time range,
while replacing gaps in the remaining series with 40.

The query without drop_empty_series:

  (temperature <= 30) default 40

would leave all the temperature series with all the values bigger than 30 on the selected time range,
and replace all their values with 40. This is not what could be epxected in some cases
like here - https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5071
2023-10-16 20:44:56 +02:00
Aliaksandr Valialkin
e25318e8ca
vendor: run make vendor-update 2023-10-16 14:28:52 +02:00
Aliaksandr Valialkin
0b66840520
vendor: run make vendor-update 2023-10-12 11:17:53 +02:00
Aliaksandr Valialkin
5eac0cdf42
vendor: run make vendor-update 2023-10-02 21:49:16 +02:00
Aliaksandr Valialkin
a740159541
app/vmselect/promql: completely substitute median_over_time() WITH template with regular median_over_time() rollup function
This is a follow-up for 34d7a670d0

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5034
2023-09-25 15:28:12 +02:00
Dmytro Kozlov
d5f9619984
vmagent: add validation of MetricsQL functions (#4991)
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-09-15 13:15:23 +02:00
Aliaksandr Valialkin
3151adda2a
vendor: return back the latest version of golang.org/x/exp/slices, which works correctly with github.com/prometheus/prometheus/model/labels 2023-09-07 13:01:39 +02:00
Aliaksandr Valialkin
cf6fc2a6b7
vendor: run make vendor-update 2023-09-07 13:01:39 +02:00
Aliaksandr Valialkin
1c0e065216
app/vmselect/promql: add support for _ delimiters in numeric values
For example, 1_234_567_890 is equivalent to 1234567890,
while 1.234_567_890 is equivalent to 1.234567890
2023-08-30 14:33:41 +02:00
Aliaksandr Valialkin
3e963debf8
vendor: run make vendor-update 2023-08-29 13:15:22 +02:00
Aliaksandr Valialkin
072d891ed9
app/vmselect: prevent from panic when lookbehind window inside rollup function is parsed into negative value
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4795
2023-08-12 04:47:53 -07:00
Aliaksandr Valialkin
e8bcb17c8a
vendor: run make vendor-update 2023-08-11 07:16:25 -07:00
hagen1778
4eecd4d0b3
vendor: make vendor-update
Follow-up after 3f6efab6ae
Related to https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4441

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-07-31 15:39:42 +02:00
Aliaksandr Valialkin
4cd1497ac1
vendor: run make vendor-update 2023-07-26 15:05:15 -07:00
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