Aliaksandr Valialkin
32e60fe09d
vendor: run make vendor-update
2024-01-30 18:47:01 +02:00
Aliaksandr Valialkin
bc7cf4950b
lib/promscrape: use the standard net/http.Client instead of fasthttp.Client for scraping targets in non-streaming mode
...
While fasthttp.Client uses less CPU and RAM when scraping targets with small responses (up to 10K metrics),
it doesn't work well when scraping targets with big responses such as kube-state-metrics.
In this case it could use big amounts of additional memory comparing to net/http.Client,
since fasthttp.Client reads the full response in memory and then tries re-using the large buffer
for further scrapes.
Additionally, fasthttp.Client-based scraping had various issues with proxying, redirects
and scrape timeouts like the following ones:
- https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1945
- https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5425
- https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2794
- https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1017
This should help reducing memory usage for the case when target returns big response
and this response is scraped by fasthttp.Client at first before switching to stream parsing mode
for subsequent scrapes. Now the switch to stream parsing mode is performed on the first scrape
after reading the response body in memory and noticing that its size exceeds the value passed
to -promscrape.minResponseSizeForStreamParse command-line flag.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5567
Overrides https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4931
2024-01-30 18:39:10 +02:00
Aliaksandr Valialkin
1a6c3370bf
vendor: run make vendor-update
2024-01-26 22:56:37 +01:00
Aliaksandr Valialkin
6eae3f6c8a
vendor: run make vendor-update
2024-01-16 16:57:30 +02:00
Aliaksandr Valialkin
7fc2bd0412
app/vmstorage: expose proper types for storage metrics when -metrics.exposeMetadata command-line flag is set
...
This is a follow-up for 326a77c697
2024-01-16 00:20:37 +02:00
Aliaksandr Valialkin
be509b3995
lib/pushmetrics: wait until the background goroutines, which push metrics, are stopped at pushmetrics.Stop()
...
Previously the was a race condition when the background goroutine still could try collecting metrics
from already stopped resources after returning from pushmetrics.Stop().
Now the pushmetrics.Stop() waits until the background goroutine is stopped before returning.
This is a follow-up for https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5549
and the commit fe2d9f6646
.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5548
2024-01-15 13:50:36 +02:00
Aliaksandr Valialkin
9fd20202e1
vendor/github.com/VictoriaMetrics/easyproto: update from v0.1.3 to v0.1.4
...
This fixes vet error for 32-bit architectures:
https://github.com/VictoriaMetrics/VictoriaMetrics/actions/runs/7521709384/job/20472882877
2024-01-15 11:31:30 +02:00
Aliaksandr Valialkin
0597718435
lib/protoparser/datadogv2: add support for reading protobuf-encoded requests at /api/v2/series endpoint
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4451
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5094
2024-01-14 21:09:05 +02:00
hagen1778
910a39ad72
vendor: go mod tidy & go mod vendor
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2023-12-22 16:10:01 +01:00
Aliaksandr Valialkin
5a88bc973f
all: use Gauge instead of Counter for *_config_last_reload_successful
metrics
...
This allows exposing the correct TYPE metadata for these labels when the app runs with -metrics.exposeMetadata command-line flag.
See https://github.com/VictoriaMetrics/metrics/pull/61#issuecomment-1860085508 for more details.
This is follow-up for 326a77c697
2023-12-20 14:23:42 +02:00
Aliaksandr Valialkin
326a77c697
all: add -metrics.exposeMetadata command-line flag, which can be used for adding TYPE and HELP metadata for metrics exposed at /metrics page
...
This may be needed for systems, which require this metadata such as Google Cloud Managed Prometheus.
See https://cloud.google.com/stackdriver/docs/managed-prometheus/troubleshooting#missing-metric-type
2023-12-19 03:20:40 +02:00
Aliaksandr Valialkin
4b529562ce
lib/pushmetrics: add -pushmetrics.header and -pushmetrics.disableCompression command-line flags
2023-12-17 19:56:46 +02:00
Aliaksandr Valialkin
f6c91b49a2
Merge branch 'public-single-node' into HEAD
2023-12-13 01:17:25 +02:00
Aliaksandr Valialkin
7df8d19831
vendor: run make vendor-update
2023-12-13 00:35:31 +02:00
Aliaksandr Valialkin
2faa23c495
vendor: run make vendor-update
2023-12-11 11:00:42 +02:00
Aliaksandr Valialkin
51df2248f0
vendor: run make vendor-update
2023-12-11 10:48:36 +02:00
Aliaksandr Valialkin
8eddccfbb4
all: expose additional metrics for simplifying debugging of VictoriaMetrics components
...
Updates https://github.com/VictoriaMetrics/metrics/issues/54
2023-11-30 02:06:54 +02:00
luckyxiaoqiang
d7897e0d70
app/vmselect/promql: add day_of_year() function ( #5368 )
...
Co-authored-by: dingxiaoqiang <dingxiaoqiang@bytedance.com>
Co-authored-by: Roman Khavronenko <roman@victoriametrics.com>
2023-11-28 11:54:00 +01:00
Aliaksandr Valialkin
a7800cdb95
vendor: update github.com/VictoriaMetrics/fastcache from v1.12.1 to v1.12.2
...
This should help reducing GC overhead growth at https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5379
2023-11-24 13:30:15 +02:00
Aliaksandr Valialkin
fd49331671
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-11-16 21:42:09 +01:00
Aliaksandr Valialkin
e9d86d7e52
vendor: run make vendor-update
2023-11-16 20:20:27 +01:00
Aliaksandr Valialkin
b65a9f2057
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-11-15 20:05:11 +01:00
Aliaksandr Valialkin
8d9e365512
vendor: update github.com/klasuspost/compress from v1.17.2 to v1.17.3
...
See https://github.com/klauspost/compress/releases/tag/v1.17.3
2023-11-15 17:18:22 +01:00
Aliaksandr Valialkin
201fb6ec5c
vendor: run make vendor-update
2023-11-14 22:45:07 +01:00
Aliaksandr Valialkin
0eb733a31e
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-11-14 03:03:15 +01:00
Aliaksandr Valialkin
b7fb7c5f77
vendor: run make vendor-update
2023-11-13 18:50:16 +01:00
Aliaksandr Valialkin
6be10fb2ff
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-11-02 21:33:03 +01:00
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
7a503e0c91
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-10-31 20:28:01 +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
31a3672982
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-10-02 22:36:23 +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
Aliaksandr Valialkin
b80ebb8bfd
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-09-19 01:15:00 +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
af85055f3a
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-09-09 06:18:18 +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
e29fe89791
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-08-12 06:01:30 -07: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
Aliaksandr Valialkin
978594f50f
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-08-11 06:45:26 -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
9f1e9c54c8
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-07-26 14:59:49 -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
43f0baabcd
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-05-18 12:34:50 -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
eba0e6dbc0
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-05-09 23:33:49 -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
e0cef082f4
vendor: make vendor-update
2023-04-06 16:30:47 -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
20fedaf7c2
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-04-03 01:08:56 -07:00
Aliaksandr Valialkin
02b714c110
vendor: make vendor-update
2023-03-31 23:59:34 -07:00
Aliaksandr Valialkin
740638ad30
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-03-27 15:37:34 -07:00
Aliaksandr Valialkin
9e02b3d48a
vendor: make vendor-update
2023-03-27 15:28:02 -07:00
Aliaksandr Valialkin
d60c212784
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-03-25 01:44:30 -07:00
Aliaksandr Valialkin
25446a7933
vendor: run make vendor-update
2023-03-24 18:08:06 -07:00
Aliaksandr Valialkin
f42572e049
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-03-20 20:39:18 -07:00
Aliaksandr Valialkin
ddbbc9a86d
vendor: make vendor-update
2023-03-15 13:24:12 -07:00
Aliaksandr Valialkin
827cde4c64
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-03-14 16:26:58 -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
02ffbfb8dc
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-03-12 03:40:02 -07:00
Aliaksandr Valialkin
c28c25ed2e
vendor: make vendor-update
2023-03-12 03:13:53 -07:00
Aliaksandr Valialkin
d0f9a5d4c4
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-02-27 15:39:19 -08:00
Aliaksandr Valialkin
8937de5f99
vendor: make vendor-update
2023-02-27 15:32:45 -08:00
Aliaksandr Valialkin
472a9360e6
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-02-27 14:19:26 -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
9d7dc73038
vendor: make vendor-update
2023-02-24 17:33:28 -08:00
Aliaksandr Valialkin
63d9048990
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-02-24 17:32:15 -08:00
Aliaksandr Valialkin
8cfe4064b5
vendor: make vendor-update
2023-02-24 17:26:51 -08:00
Aliaksandr Valialkin
be94882ada
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
2023-02-23 19:27:31 -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