Aliaksandr Valialkin
c1e32f4517
lib/promrelabel: add test for IfExpression.String() function
...
While at it, simplify this function a bit after the commit 861852f262
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/6462
2024-07-16 18:31:05 +02:00
Aliaksandr Valialkin
62651570bb
lib/promrelabel: add support for a list of series selectors at IfExpression
...
This makes possible specifying a list of series selectors at the following places:
- Inside `if` option at relabeling rules
- Inside `match` option at stream aggregation rules
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4635
2023-07-24 17:08:52 -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
Aliaksandr Valialkin
a8b8e23d68
lib/promscrape: implement target-level and metric-level relabel debugging
...
Target-level debugging is performed by clicking the 'debug' link at the corresponding target
on either http://vmagent:8429/targets page or on http://vmagent:8428/service-discovery page.
Metric-level debugging is perfromed at http://vmagent:8429/metric-relabel-debug page.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3407
See https://docs.victoriametrics.com/vmagent.html#relabel-debug
2022-12-10 02:09:44 -08:00
Aliaksandr Valialkin
f325410c26
lib/promscrape: optimize service discovery speed
...
- Return meta-labels for the discovered targets via promutils.Labels
instead of map[string]string. This improves the speed of generating
meta-labels for discovered targets by up to 5x.
- Remove memory allocations in hot paths during ScrapeWork generation.
The ScrapeWork contains scrape settings for a single discovered target.
This improves the service discovery speed by up to 2x.
2022-11-29 21:26:00 -08:00
Aliaksandr Valialkin
3a98ef2f5f
lib/promrelabel: export MustParseMetricWithLabels function, which can be used for simplifying tests
2022-10-01 16:05:51 +03:00
Aliaksandr Valialkin
8550c44e31
app/vmagent: add ability to construct a label from multiple existing labels by referring them in the replacement
field during relabeling
...
For example:
- target_label: composite-label
replacement: "{{source_label1}}-{{source_label2}}"
2022-08-21 22:50:01 +03:00
Aliaksandr Valialkin
c18f8cccfa
lib/promrelabel: support action: graphite
relabeling
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2737
2022-06-16 20:24:22 +03:00
Dmytro Kozlov
a3ee275149
lib/promscrape: Enable filters for endpoint and labels ( #2466 )
...
* lib/promscrape: Enable filters for endpoint and labels
* lib/promscrape: cleanup
* lib/promscrape: update template
* lib/promscrape: move logic filter logic to backend
* lib/promscrape: updated placeholder
* lib/promscrape: updated placeholder
* lib/promscrape: use two different fields for filters, updated form, added error on parsing queries
* lib/promscrape: rename functions
* lib/promscrape: removed unused values
* wip
* wip
* wip
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-04-19 18:26:21 +03:00
Aliaksandr Valialkin
3f49bdaeff
lib/promrelabel: add support for conditional relabeling via if
filter
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1998
2022-02-24 02:27:26 +02:00