Aliaksandr Valialkin
c49751adf8
lib/regexutil: add Simplify() function for simplifying the regular expression
2022-08-26 11:57:43 +03:00
Aliaksandr Valialkin
909e681024
lib/promrelabel: optimize action: {drop,keep,labeldrop,labelkeep}
with anchored regex
prefix
...
The following commonly used relabeling rules must work faster now:
- action: labeldrop
regex: "^foo.+$"
- action: labeldrop
regex: "^bar.*"
2022-08-25 23:24:38 +03:00
Aliaksandr Valialkin
d60654eb0a
lib/promrelabel: optimize action: {labeldrop,labelkeep,keep,drop}
with regex
containing alternate values
...
For example, the following relabeling rule must work much faster now:
- action: labeldrop
regex: "foo|bar|baz"
2022-08-24 17:55:54 +03:00
Aliaksandr Valialkin
891eb608df
lib/storage: increase the maximum possible or
values extracted from regexp from 20 to 100
...
This should improve time series search speed for regexp filters with big number of `or` values.
2022-08-24 17:16:29 +03:00
Aliaksandr Valialkin
1b14cf18b6
lib/storage: ignore start text
and end text
anchors in getOrValues(regexp) function
...
This is OK, since the anchors are implicitly applied to the whole regexp.
This optimization should improve the speed for regexp series filters with explicit $ and ^ anchors.
For example, `{label="^(foo|bar)$"}`
2022-08-24 17:16:28 +03:00
Aliaksandr Valialkin
d4cf52f092
app/vmagent: follow-up after 2b22aa1537
...
- Document the change at docs/CHANGELOG.md
- Move auth token parsing from app/vmagent/opentsdbhttp/ to app/vmagent/main.go,
since it must be parsed only when multitenancy support is enabled at vmagent side.
See https://docs.victoriametrics.com/vmagent.html#multitenancy
2022-08-24 16:21:23 +03:00
Jianyun Cheng
eccae22522
[vmagent] make opentsdb insert url support multitenant ( #3015 )
2022-08-24 16:21:22 +03:00
Dmytro Kozlov
d32a6359b0
vmselect/promql: enable search.maxPointsSubqueryPerTimeseries for sub-queries ( #2963 )
...
* vmselect/promql: enable search.maxPointsPerTimeSeriesSubquery for sub-queries
* vmselect/promql: cleanup
* vmselect/promql: rename config flag
* vmselect/promql: add tests
* vmselect/promql: use test object instead of log
* vmselect/promql: fix posible panic is subquery has more points. add description
* vmselect/promql: update tests descriptions
* vmselect/promql: update doInternal validation
* vmselect/promql: fix linter
* vmselect/promql: fix linter
* vmselect/promql: update documentation and release notes
* wip
- Properly apply -search.maxPointsSubqueryPerTimeseries limit to subqueries.
Previously the -search.maxPointsPerTimeseries limit was unexpectedly applied to subqueries
if it was smaller than the -search.maxPointsSubqueryPerTimeseries .
- Clarify docs for -search.maxPointsSubqueryPerTimeseries command-line flag .
- Document -search.maxPointsPerTimeseries and -search.maxPointsSubqueryPerTimeseries flags at https://docs.victoriametrics.com/#resource-usage-limits .
- Update docs/CHANGELOG.md .
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2922
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-08-24 15:27:41 +03:00
Aliaksandr Valialkin
e2d8916935
docs: mention that it is safe sharing the collected profiles from security PoV
...
The collected profiles do not contain sensitive information
2022-08-24 14:08:30 +03:00
Aliaksandr Valialkin
7b9ba456ff
app/vmstorage: expose vm_{hourly,daily}_series_limit_{max,current}_series
metrics if -storage.max{Hourly,Daily}Series
limits are set
...
These metrics allow alerting when the number of unique series approach the limit.
For example, the following query alerts when the number of series reaches 90% of the configured limit:
vm_hourly_series_limit_current_series / vm_hourly_series_limit_max_series > 0.9
2022-08-24 13:41:57 +03:00
Aliaksandr Valialkin
ad6652247c
all: update Google Analytics tracking code from Unversal Analytics to v4
...
This is needed because Google Analytics devs decided to force their users
to update all their tracking codes to GA v4.
See https://support.google.com/analytics/answer/9744165
The link to the new tracking property ( G-N9SVT8S3HK ) - https://analytics.google.com/analytics/web/?authuser=1#/a129683199p328513681/admin/streams/table/4004610168
2022-08-24 12:16:18 +03:00
Aliaksandr Valialkin
547d655d29
docs/vmagent.md: fix alerting query when scraped samples are dropped because of exceeded series limit
...
This is a follow-up after 7d26414b2e
2022-08-24 01:23:37 +03:00
Roman Khavronenko
555a202d80
docs: follow-up after 88425bb285
( #3007 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-08-24 01:23:37 +03:00
laixintao
76a291a95b
vmalert: add $activeAt into template variables. ( #3000 )
...
vmalert: add `$activeAt` template variable for annotations
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2999
2022-08-24 01:23:37 +03:00
Aliaksandr Valialkin
08b8467e97
app/vmselect/netstorage: make golangci-lint happy by naming the unused padding field as _
2022-08-22 00:32:37 +03:00
Aliaksandr Valialkin
9ddd2699fd
all: remove the remaining bits of io/ioutil
...
The io/ioutil package is deprecated since Go1.16 - see https://tip.golang.org/doc/go1.16#ioutil
VictoriaMetrics requires at least Go1.18, so it is time to remove the io/ioutil from source code
This is a follow-up for 02ca2342ab
2022-08-22 00:22:41 +03:00
Aliaksandr Valialkin
1905618d10
all: subsitute ioutil.ReadAll with io.ReadAll
...
ioutil.ReadAll is deprecated since Go1.16 - see https://tip.golang.org/doc/go1.16#ioutil
VictoriaMetrics requires at least Go1.18, so it is OK to switch from ioutil.ReadAll to io.ReadAll.
This is a follow-up for 02ca2342ab
2022-08-22 00:16:04 +03:00
Aliaksandr Valialkin
88e0fe9469
all: use os.ReadDir instead of ioutil.ReadDir
...
The ioutil.ReadDir is deprecated since Go1.16 - see https://tip.golang.org/doc/go1.16#ioutil
VictoriaMetrics requires at least Go1.18, so it is time to switch from io.ReadDir to os.ReadDir
This is a follow-up for 02ca2342ab
2022-08-22 00:04:09 +03:00
Aliaksandr Valialkin
06f6de6d47
all: use os.{Read|Write}File instead of ioutil.{Read|Write}File
...
The ioutil.{Read|Write}File is deprecated since Go1.16 -
see https://tip.golang.org/doc/go1.16#ioutil
VictoriaMetrics needs at least Go1.18, so it is safe to remove ioutil usage
from source code.
This is a follow-up for 02ca2342ab
2022-08-21 23:55:20 +03:00
Aliaksandr Valialkin
c5325f2db5
docs/CHANGELOG.md: document d59d829cdb
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2673
2022-08-21 23:37:15 +03:00
Roman Khavronenko
fc2b8b4efd
lib/storage: bump max merge concurrency for small parts to 15 ( #2997 )
...
* lib/storage: bump max merge concurrency for small parts to 15
The change is based on the feedback from users on github.
Thier examples show, that limit of 8 sometimes become a
bottleneck. Users report that without limit concurrency
can climb up to 15-20 merges at once.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* Update lib/storage/partition.go
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-08-21 23:37:14 +03:00
Ivan Dudin
c7ca124803
Update Cluster-VictoriaMetrics.md ( #3005 )
...
Flags `-search.maxTagKeys` and `-search.maxTagValues` are present at vmstorage and not at vmselect
```
-search.maxTagKeys int
-search.maxTagValues int
```
2022-08-21 23:30:15 +03:00
Aliaksandr Valialkin
7f46c17e4e
docs/Cluster-VictoriaMetrics.md: document the best strategies for cluster update / upgrade
2022-08-21 23:20:26 +03:00
Aliaksandr Valialkin
1c7f402598
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:49:24 +03:00
Aliaksandr Valialkin
1509fab1b2
vendor: make vendor-update
2022-08-21 19:08:20 +03:00
Aliaksandr Valialkin
ecd8a03b28
docs: change links to Prometheus docs about instant and range queries to links to VictoriaMetrics docs
2022-08-21 19:02:46 +03:00
Aliaksandr Valialkin
3c597d1985
docs/keyConcepts.md: more fixes
2022-08-21 18:53:49 +03:00
Aliaksandr Valialkin
8e86d52c23
docs/FAQ.md: add a question on differences between Grafana Mimir and VictoriaMetrics
2022-08-21 17:00:49 +03:00
Aliaksandr Valialkin
7df5e19de5
docs/keyConcepts.md - clarify docs a bit
2022-08-21 12:00:53 +03:00
Aliaksandr Valialkin
34d764874f
docs/Cluster-VictoriaMetrics.md: clarify required conditions for cluster availability
2022-08-20 09:39:07 +03:00
Aliaksandr Valialkin
6d2354e7a4
app/vmalert/README.md: sync with docs/vmalert.md after a229182dbe
2022-08-20 08:54:55 +03:00
laixintao
107ac2a85e
doc: fix broken url of template function for vmalert. ( #3002 )
2022-08-20 08:54:54 +03:00
Aliaksandr Valialkin
76844e519b
docs/CHANGELOG.md: document 10402459d8
2022-08-19 11:44:29 +03:00
Roman Khavronenko
2c59c83191
lib/storage: fix the search for empty label name ( #2991 )
...
* lib/storage: fix the search for empty label name
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* Apply suggestions from code review
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-08-19 11:05:09 +03:00
Roman Khavronenko
2256d51418
docs: fix docs formatting related to vmalert ( #2994 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-08-19 11:05:08 +03:00
Denys Holius
fb80735a9a
deployment: bump Grafana version to latest 9.1.0 ( #2995 )
...
see more at https://grafana.com/blog/2022/08/16/grafana-9.1-release/
2022-08-18 12:20:56 +02:00
Aliaksandr Valialkin
84c80b0481
docs/relabeling.md: fix heading for useful tips for target relabeling
2022-08-18 01:33:22 +03:00
Aliaksandr Valialkin
26212aa14a
docs/relabeling.md: typo fixes
2022-08-18 01:30:27 +03:00
Aliaksandr Valialkin
570ce15cb8
docs/relabeling.md: improve relabeling tips for scrape targets
2022-08-18 01:24:35 +03:00
Aliaksandr Valialkin
aed6e33cb4
docs/relabeling.md: add a link to VictoriaMetrics enhancements for relabeling
2022-08-18 01:24:33 +03:00
Aliaksandr Valialkin
a6970e3052
docs: fix ordering after adding the docs/relabeling.md
2022-08-18 01:17:55 +03:00
Aliaksandr Valialkin
29eb9d4602
docs/relabeling.md: add a cookbook for common relabeling tasks
2022-08-18 01:14:30 +03:00
Aliaksandr Valialkin
bbfa52bd75
docs: follow-up after 68e56b6fc5
2022-08-17 21:27:24 +03:00
Aliaksandr Valialkin
2de9d42dcc
go.mod: update github.com/VictoriaMetrics/metrics from v1.22.1 to v1.22.2
2022-08-17 21:27:24 +03:00
Roman Khavronenko
cfcb5ab15b
vmalert: set alert's source link to UI instead of JSON source ( #2986 )
...
We switch default alert's source link to redirect user
to vmalert's UI instead of previous JSON object. While it breaks
compatibility, it also supposed to improve user's experience.
The old behavior can be achieved by updating `-external.alert.source`
command-line flag.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-08-17 21:27:24 +03:00
Aliaksandr Valialkin
d62e9bc964
docs/sd_configs.md: clarify a bit honor_labels config option
2022-08-17 14:24:53 +03:00
Aliaksandr Valialkin
87e0d69bf4
app/vmselect/netstorage: fix a bug introduced in 1a254ea20c
...
The bug results in `duplicate output time series` error
because the same time series is added two times into the orderedMetricNames list
inside the tmpBlocksFileWrapper.Finalize().
While at it, properly release all the tmpBlocksFile structs on tbf.Finalize() error.
Previously only the remaining tbf entries were released. This could result in resource leak.
2022-08-17 14:07:51 +03:00
Aliaksandr Valialkin
1812d33a2d
lib/promscrape: automatically generate additional per-target labels for targets with non-zero series limit
...
The following metrics are generated:
- scrape_series_limit
- scrape_series_current
- scrape_series_limit_samples_dropped
These metrics simplify alerting on targets, which expose too many time series
See https://docs.victoriametrics.com/vmagent.html#automatically-generated-metrics
and https://docs.victoriametrics.com/vmagent.html#cardinality-limiter for more details
2022-08-17 13:22:02 +03:00
Roman Khavronenko
0261118765
docs: add new article link ( #2989 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-08-17 13:22:02 +03:00
Aliaksandr Valialkin
e5c61cac22
docs/CHANGELOG.md: group vmalert features closer to each other
2022-08-17 11:49:53 +03:00