Aliaksandr Valialkin
f2816ef031
lib/promscrape/discovery/ec2: properly handle custom endpoint
option in ec2_sd_configs
...
This option was ignored since d289ecded1
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1287
2022-08-05 18:50:02 +03:00
Aliaksandr Valialkin
83a4abda3f
lib/promscrape/discovery/yandexcloud: follow-up after 6e5ac32fba
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1386
2022-08-04 22:26:43 +03:00
Igor Tiunov
6e5ac32fba
YC service discovery ( #2923 )
...
* YC service discovery
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1386
* Fixed linter suggestions
* fixed golint errors
2022-08-04 20:44:16 +03:00
Aliaksandr Valialkin
7478d423c5
app/vmselect/netstorage: cleanup after 92630c1ab4
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2896
2022-08-04 18:28:11 +03:00
Aliaksandr Valialkin
752a3008b4
docs: fix the recommended url for -vmalert.proxyURL accroding to 8667307d73
2022-08-04 17:56:07 +03:00
Aliaksandr Valialkin
6b0550c023
app/{vmselect,vmalert}: properly generate http redirects if -http.pathPrefix
command-line flag is set
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2918
2022-08-02 12:59:07 +03:00
Aliaksandr Valialkin
c2bd75926b
app/vmselect/netstorage: initialize tsw.rowsProcessed before calling tsw.f, since tsw.f can modify r.Timestamps and r.Values lengths
2022-07-30 00:39:36 +03:00
Aliaksandr Valialkin
19a0b4679a
app/vmselect/netstorage: re-use random generator used for series shuffle in Result.RunParallel
...
This should reduce CPU usage needed for rand.Rand initialization
2022-07-30 00:30:37 +03:00
Dmytro Kozlov
a927814e7b
vmselect/promql: add tests for vmrangeBucketsToLE ( #2907 )
...
* vmselect/promql: add tests for vmrangeBucketsToLE
* vmselect/promql: cleanup
* vmselect/promql: cleanup
* vmselect/promql: fix panic tests want result
* vmselect/promql: cleanup
* vmselect/promql: update test name
* vmselect/promql: fix linter error
* vmselect/promql: refactor testcases
* vmselect/promql: cleanup
* vmselect/promql: remove unused reassign to workers, fix typo
* wip
* wip
* wip
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-26 20:42:41 +03:00
Aliaksandr Valialkin
da11056d85
all: rename -pushmetrics.extraLabels to -pushmetrics.extraLabel for the sake of consistency
2022-07-26 19:24:24 +03:00
Aliaksandr Valialkin
c888e6b9be
app/vmselect/promql: reduce the diff for f148cffc8a
...
This is a follow-up for c826f06366
2022-07-26 19:20:48 +03:00
Alan Liang
c826f06366
vmselect: fix vmrangeBucketsToLE func may panic when ts value equal zero ( #2902 )
...
Co-authored-by: alanwzliang <alanwzliang@tencent.com>
2022-07-25 10:55:13 +03:00
Aliaksandr Valialkin
2e0b6d680e
app/vmalert/config: add missing docs for ValidateTplFn
2022-07-25 09:23:13 +03:00
Aliaksandr Valialkin
92630c1ab4
app/vmselect/netstorage: improve the speed of queries over big number of time series on multi-CPU system
...
Reduce inter-CPU communications when processing the query over big number of time series.
This should improve performance for queries over big number of time series
on systems with many CPU cores.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2896
Based on b596ac3745
Thanks to @zqyzyq for the idea.
2022-07-25 09:18:44 +03:00
Roman Khavronenko
1aa5112771
vmalert: remove notifier
dependency from config
( #2906 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-22 13:50:41 +02:00
Aliaksandr Valialkin
ad6b3cd47d
lib/pushmetrics: properly handle errors when initializing pushmetrics
2022-07-22 13:36:06 +03:00
Roman Khavronenko
2914ce5ca5
vmalert: remove dependency on datasource pkg from config ( #2905 )
...
* vmalert: remove dependency on datasource pkg from config
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-22 10:44:55 +02:00
Aliaksandr Valialkin
89890eab5d
docs/vmgateway: typo fix in regexp filter: ~=
is substituted with =~
2022-07-21 22:37:12 +03:00
Aliaksandr Valialkin
79d967d35a
app/vmselect/vmui: make vmui-update
after edecd2493c
2022-07-21 20:59:52 +03:00
Aliaksandr Valialkin
67bca5a6f6
app/vmalert/utils: add missing docs to WithHeaders func added at 70a822f3a0
2022-07-21 20:40:14 +03:00
Aliaksandr Valialkin
5ced032d66
all: follow-up after 46f803fa7a
...
Add -pushmetrics.* command-line flags to all the VictoriaMetrics apps
2022-07-21 20:36:27 +03:00
Aliaksandr Valialkin
4ce5875fa8
all: add ability to push internal metrics to remote storage system specified via -pushmetrics.url
2022-07-21 20:36:27 +03:00
Roman Khavronenko
88edb3f6cf
vmalert: allow configuring custom headers per group ( #2901 )
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2860
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-21 15:59:55 +02:00
Roman Khavronenko
70a822f3a0
vmalert: allow configuring custom headers for URLs ( #2897 )
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2860
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-21 13:57:53 +02:00
dependabot[bot]
579cc4e122
build(deps): bump terser in /app/vmui/packages/vmui ( #2895 )
...
Bumps [terser](https://github.com/terser/terser ) from 5.13.1 to 5.14.2.
- [Release notes](https://github.com/terser/terser/releases )
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md )
- [Commits](https://github.com/terser/terser/commits )
---
updated-dependencies:
- dependency-name: terser
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 11:45:39 +02:00
Yury Molodov
edecd2493c
fix: change the z-index of the datepicker ( #2891 )
2022-07-21 07:46:28 +02:00
Roman Khavronenko
9ccf695d57
vmselect: return correct error for second part of expression ( #2893 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-20 16:44:28 +02:00
Aliaksandr Valialkin
6a079df33f
deployment/docker: update alpine base image from 3.16.0 to 3.16.1
...
See https://alpinelinux.org/posts/Alpine-3.16.1-released.html
2022-07-19 19:50:54 +03:00
Aliaksandr Valialkin
22fc7e0e04
docs/vmauth.md: mention that multiple recrods for the same username are supported
...
This is a follow-up for 88029c521c
2022-07-19 19:42:42 +03:00
Nikolay
88029c521c
app/vmauth: allow duplicate usernames ( #2888 )
...
Usernames could be duplicate if it has uniq password.
vmauth makes routing based on auth token and username + password combination must be unique for this case.
2022-07-19 19:33:17 +03:00
Aliaksandr Valialkin
cc7d499bbd
app/vmselect/promql: execute q1
and q2
from q1 op q2
in parallel if labels pushdown cannot be applied
...
This should improve query performance if VictoriaMetrics has enough resources for processing `q1` and `q2` in parallel.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2886
2022-07-19 14:27:48 +03:00
Roman Khavronenko
27f1c65074
vmagent: expose metric vmagent_remotewrite_queues
( #2871 )
...
The new metric `vmagent_remotewrite_queues` exports a static value of
number of configured remote write queus. This metric is useful to
calculate total saturation per each configured URL with given number
of queues. See corresponding changes to vmagent alerts and dashboard.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-18 14:31:35 +03:00
Aliaksandr Valialkin
b5da47bfaf
app/vmselect/promql: properly return q1
series from q1 ifnot q2
when q2
returns nothing
2022-07-18 14:24:54 +03:00
Aliaksandr Valialkin
0792c4ca90
app/vmselect/promql/transform.go: reuse evalNumber() function for constructing timezone_offset() results
2022-07-18 14:24:53 +03:00
cui fliter
6f4d9b2a48
fix some typos ( #2882 )
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2022-07-18 12:02:51 +03:00
Roman Khavronenko
f07bfcf0c9
vmalert: drop support of deprecated extra_filter_labels
param ( #2870 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-14 15:45:08 +03:00
Aliaksandr Valialkin
f9500abfe0
app: fix make publish-*
after ed93330e66
...
Add missing `-linux` substring to built binary names for copying into Docker images
2022-07-14 10:59:11 +03:00
Aliaksandr Valialkin
9c435d7a9d
docs: update descriptions for command-line flags according to the latest changes
2022-07-14 00:57:07 +03:00
Yury Molodov
17c33132df
vmui: optimize table view ( #2867 )
...
* feat: optimize table view
* fix: add column display setting
* app/vmselect: `make vmui-update`
Also document the change at docs/CHANGELOG.md
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-14 00:15:43 +03:00
Dmytro Kozlov
a0d0ba7219
vmui: update time picker behavior ( #2847 )
...
* vmui: update time picker behavior
* docs/CHANGELOG.md: document the change
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-14 00:05:47 +03:00
Yury Molodov
e4efebf4a4
vmui: change selection from autocomplete ( #2862 )
...
* fix: change selection from autocomplete
* update docs/CHANELOG.md
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-13 23:54:56 +03:00
Nikolay
7301aa678c
lib/promscrape: adds azure service discovery ( #2743 )
...
* lib/promscrape: adds azure service discovery
Adds azure service discovery mechanism
implements authorization with oauth and msi
lists virtual machines and virtual machines managed by scaleSet
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1364
* makes linter happy
* Apply suggestions from code review
Co-authored-by: Roman Khavronenko <roman@victoriametrics.com>
* wip
Co-authored-by: Roman Khavronenko <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-13 23:43:18 +03:00
Aliaksandr Valialkin
2d9dbaf75d
deployment/docker: update Go builder from go1.18.3 to go1.18.4
...
See https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved
2022-07-13 18:46:34 +03:00
Aliaksandr Valialkin
ed93330e66
all: follow-up for d99ba3481b
2022-07-13 16:44:39 +03:00
Dmytro Kozlov
d99ba3481b
Rename release packages ( #2810 )
...
* makefile: add os to each release file
* makefile: update vmutils arm64
* makefile: update victoria-metrics release process
* makefile: update publish with os
* makefile: update publish with os
* makefile: change tar library
* update release logic
* copy all releases
* sort command by GOOS
* rollback commands
* rollback OSARCH
* fix commands
* cleanup
* fix windows build
* sort build by GOOS, update README.md
2022-07-13 15:42:48 +03:00
Boris Petersen
41e9702698
fix typo introduced in pr #2604 ( #2866 )
...
Signed-off-by: Boris Petersen <boris.petersen@idealo.de>
2022-07-13 15:40:47 +03:00
guidao
91faa152a5
add next retention metric ( #2863 )
...
Co-authored-by: wangfeng <wangfeng@zhihu.com>
2022-07-13 12:37:04 +03:00
Aliaksandr Valialkin
29e53b9f55
app/vmselect/promql: consistency update after 93fbd0c54b
2022-07-13 12:33:14 +03:00
Roman Khavronenko
93fbd0c54b
promql: return step
as scrapeInterval when it can't be calculated ( #2865 )
...
The change allows to specify default value for `getScrapeInterval`
function when actual interval can't be calculated.
Before the change, function were returning `maxSilenceInterval` (5m)
in such cases, which may be not correct for instant queries processing.
The specific scenario where using `maxSilenceInterval` caused issues
is the following:
1. Series becomes stale;
2. Client (in this case vmalert) continues to request series every 15s;
3. Database returns empty results as expected;
4. But at some specific moment of time database returns datapoints from `now()-5m`,
because lookback window was extended to `maxSilenceInterval`.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-13 12:27:38 +03:00
Aliaksandr Valialkin
c2197ad139
app/vmselect/promql: validate function name before evaluating its arguments
...
This avoids unneeded evaluation of args for unknown functions
2022-07-12 19:48:26 +03:00
Aliaksandr Valialkin
159c2e15e3
app/vmselect/netstorage: optimize mergeSortBlocks() for the worst case when blocks contain interleaved samples
2022-07-12 12:31:38 +03:00
Aliaksandr Valialkin
8429d4af5a
app/vmselect/netstorage: add mergeSortBlocks benchmark for the worstcase
2022-07-12 12:31:36 +03:00
Aliaksandr Valialkin
cad471037a
app/vmselect/prometheus: follow-up after 3efe33b917
2022-07-11 20:35:28 +03:00
Dmytro Kozlov
3efe33b917
vmselect/prometeus: Add limit param to api/v1/series api endpoint ( #2851 )
...
* issue-2841: Add limit param to api/v1/series api endpoint
* issue-2841: add change log
* issue-2841: update logic
* issue-2841: simplify logic
* issue-2841: simplify logic, add information to documentation
2022-07-11 20:18:30 +03:00
Aliaksandr Valialkin
ce68e76d62
app/vmselect: follow-up after 8667307d73
2022-07-11 20:14:34 +03:00
Roman Khavronenko
8667307d73
vmselect: cover special cases for vmalert's routing in single-node version ( #2845 )
...
* vmselect: cover special cases for vmalert's routing in single-node version
* remove trailing `/` from requests
* redirect to vmalert's home page when `/vmalert` is requested.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* vmalert: fix review comments
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* Update app/vmselect/main.go
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-11 19:52:22 +03:00
Aliaksandr Valialkin
5c8eee26bf
all: make fmt
via the upcoming Go1.19
2022-07-11 19:22:15 +03:00
Aliaksandr Valialkin
8851cf68e1
docs: make more clear the relation between replication and deduplication
...
This is based on https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2852
2022-07-11 19:22:15 +03:00
Aliaksandr Valialkin
cd09f583fe
app/vmselect/netstorage: add benchmarks for mergeSortBlocks
...
This is a follow-up for 743ff84863
2022-07-11 12:54:48 +03:00
Aliaksandr Valialkin
743ff84863
app/vmselect/netstorage: optimize mergeSortBlocks function
...
- Use binary search instead of linear scan when locating the run of smallest timestamps
in blocks with intersected time ranges. This should improve performance
when merging blocks with big number of samples
- Skip samples with duplicate timestamps. This should increase query performance
in cluster version of VictoriaMetrics with the enabled replication.
2022-07-09 00:34:42 +03:00
Roman Khavronenko
e1a41cfab5
metricsql: properly evaluate timezone_offset
over time interval ( #2842 )
...
* metricsql: properly evaluate `timezone_offset` over time interval
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2771
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* Update docs/CHANGELOG.md
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-07-08 14:03:56 +03:00
Aliaksandr Valialkin
338fd115d9
app/vmalert/utils/links.go: document Prefix function, which has been added in b29fafa86b
2022-07-08 13:27:15 +03:00
Aliaksandr Valialkin
2e9ae40d56
app/vmselect/vmui: follow-up after 0bf6841140
...
* Document the bugfix in docs/CHANGELOG.md
* Run `make vmui-update` for updating static js files for vmui, which are included into vmselect
2022-07-08 13:14:17 +03:00
Dmytro Kozlov
0bf6841140
vmui: fix query for json and table tabs ( #2846 )
...
* vmui: fix query for json and table
* vmui: add step param
2022-07-08 13:09:31 +03:00
Roman Khavronenko
e9b977859b
vmalert: deprecate alert's status link ( #2840 )
...
* vmalert: deprecate alert's status link
Deprecate alert's status link `/api/v1/<groupID>/<alertID>/status` in favour of
`api/v1/alerts?group_id=<group_id>&alert_id=<alert_id>"`.
The change was needed for simplifying logic in vmselect for proxying vmalert's requests.
The old alert's status link will be still supported for a few versions but will be removed in the future.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* vmalert: fix review comments
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-08 10:26:13 +02:00
Aliaksandr Valialkin
d3711e66fd
docs/vmagent.md: clarify that vmagent supports Prometheus-compatible service discovery
2022-07-07 21:21:28 +03:00
Aliaksandr Valialkin
ec4d39e893
docs/vmagent.md: typo fixes after ef2eeeb642
2022-07-07 21:16:37 +03:00
Aliaksandr Valialkin
ef2eeeb642
docs/vmagent.md: actualize docs
2022-07-07 20:35:47 +03:00
Aliaksandr Valialkin
10cb67adb5
app/{vmagent,vminsert}: follow-up after d19e46de55
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2839
2022-07-07 01:30:58 +03:00
Pedro Gonçalves
d19e46de55
app/vminsert: allow to ingest datadog metrics with simpler tags - not enforcing key:value ( #2839 )
2022-07-07 01:18:00 +03:00
Roman Khavronenko
7eb519b92e
docs: mention deduplication issue for HA vmalert topology ( #2838 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-07 01:13:05 +03:00
Aliaksandr Valialkin
a6bd442ef9
app/vmui: tune visual presentation of trace view
2022-07-06 14:07:12 +03:00
Aliaksandr Valialkin
bd5b20445e
app/vmselect: add ability to query vmselect
from another vmselect
2022-07-06 13:30:12 +03:00
Aliaksandr Valialkin
17de8a41c2
all: follow-up after ed89106274
2022-07-06 12:44:46 +03:00
Aliaksandr Valialkin
77cbbacfdb
lib/vmselectapi: pass storage.SearchQuery to API calls instead of []*storage.TagFilters + storage.TimeRange + maxMetrics
...
This reduces the number of args to vmselectapi calls
2022-07-06 12:37:54 +03:00
Aliaksandr Valialkin
f435924ab3
lib/vmselectapi: pass maxSuffixes arg to tagValueSuffixes RPC call
2022-07-06 12:37:54 +03:00
Aliaksandr Valialkin
e1b8059086
lib/vmselectapi: rename deleteMetrics to more correct deleteSeries
2022-07-06 12:37:54 +03:00
Aliaksandr Valialkin
a60e03b3a7
lib/vmselectapi: use string type for tagKey and tagValuePrefix args at TagValueSuffixes()
...
This improves the API consistency
2022-07-06 12:37:53 +03:00
Roman Khavronenko
ed89106274
vmselect: allow proxying requests to vmalert from single-node ( #2834 )
...
The change allows to proxy requests with prefix `/vmalert`
to the vmalert component if `-vmalert.proxyURL` is set.
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825
and https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2831
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-06 10:47:26 +02:00
Roman Khavronenko
84e7c517d3
vmalert: make UI and assets links relative ( #2831 )
...
* make all links in vmalert relative, so links continue to work even if vmalert sits behind the proxy;
* update vmalert's routing to always have component-unique path prefix, e.g. /vmalert;
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-07-06 10:46:01 +02:00
Aliaksandr Valialkin
ae80cf76e0
app/vmselect: make fmt
after f3ece83e67
2022-07-05 14:35:24 +03:00
Aliaksandr Valialkin
f3ece83e67
app/vmselect/promql: properly calculate histogram_quantile over unexpected le
buckets
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2819
2022-07-05 13:19:24 +03:00
Aliaksandr Valialkin
855436efd2
lib/promauth: refactor NewConfig in order to improve maintainability
...
1. Split NewConfig into smaller functions
2. Introduce Options struct for simplifying construction of the Config with various options
This commit is based on https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2684
2022-07-04 14:31:12 +03:00
Dmytro Kozlov
9f6cfea31d
vmui: disable ripple on nested component, enable copy text on button ( #2808 )
2022-07-01 09:52:45 +02:00
Aliaksandr Valialkin
84e373e5c7
app/vmselect/promql: properly handle partial counter resets in rate(), irate(), increase() and remove_resets() functions
2022-06-30 22:39:38 +03:00
Aliaksandr Valialkin
2a877a2a3c
app/vmagent/remotewrite: do not shadow headers
global variable in getAuthConfig
2022-06-30 20:18:12 +03:00
Aliaksandr Valialkin
fcc4258404
app/vmagent/remotewrite: clarify descriptions for -remoteWrite.*
options, which must be set per each -remoteWrite.url
2022-06-30 20:18:11 +03:00
Aliaksandr Valialkin
c392d6d173
app/vmagent/remotewrite: add -remoteWrite.header
command-line flag for setting additional http headers to send to -remoteWrite.url
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2805
2022-06-30 20:00:23 +03:00
Aliaksandr Valialkin
e40b40afe6
Revert "lib/promscrape, vmagent: fix path to files ( #2801 )"
...
This reverts commit 0a8e35835c
.
Reason for revert: it incorrectly fixes the https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2799
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2799#issuecomment-1171392005
2022-06-30 18:23:56 +03:00
Aliaksandr Valialkin
3e2dd85f7d
all: readability improvements for query traces
...
- show dates in human-readable format, e.g. 2022-05-07, instead of a numeric value
- limit the maximum length of queries and filters shown in trace messages
2022-06-30 18:20:33 +03:00
Dmytro Kozlov
0a8e35835c
lib/promscrape, vmagent: fix path to files ( #2801 )
...
vmagent: respect `-pathPrefix` flag for static files and links
2022-06-30 16:22:54 +02:00
Dmytro Kozlov
4d9715f5a8
vmui: update render logic for nested component ( #2795 )
...
* vmui: update render logic for nested component, avoid rerender, remove local storage usage for tracing flag
* docs/url-examples.md: fix various documentation issues there
* docs: add Troubleshooting doc
This doc contains troubleshooting guides for typical problems with VictoriaMetrics.
* docs/Troubleshooting.md: add troubleshooting guide for cluster instability
* wip
* wip
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-30 15:47:12 +03:00
Aliaksandr Valialkin
56622bff73
docs: add Troubleshooting doc
...
This doc contains troubleshooting guides for typical problems with VictoriaMetrics.
2022-06-30 13:53:59 +03:00
Aliaksandr Valialkin
a14188dd8e
app/vmselect: expose additional histograms at /metrics
page, which may help get more insights for the query workload
...
This commit is based on https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2792
2022-06-28 20:18:13 +03:00
Aliaksandr Valialkin
a43f2d0bc5
app/vmselect/promql: show the number of scanned samples in the query trace
2022-06-28 19:26:17 +03:00
Aliaksandr Valialkin
a5181703b1
app/vmselect/prometheus: reduce the default value for -search.maxSeries from 100k to 30k
...
Production experience shows that 100k is too big for /api/v1/series .
It leads to increased CPU usage when Grafana queries /api/v1/series over VictoriaMetrics
with big number of time series during auto-completion and when modifying template variables.
2022-06-28 18:22:30 +03:00
Aliaksandr Valialkin
a350d1e81c
lib/storage: return marshaled metric names from SearchMetricNames
...
Previously SearchMetricNames was returning unmarshaled metric names.
This wasn't great for vmstorage, which should spend additional CPU time
for marshaling the metric names before sending them to vmselect.
While at it, remove possible duplicate metric names, which could occur when
multiple samples for new time series are ingested via concurrent requests.
Also sort the metric names before returning them to the client.
This simplifies debugging of the returned metric names across repeated requests to /api/v1/series
2022-06-28 18:17:15 +03:00
Aliaksandr Valialkin
e578549b8a
app/vmselect: optimize /api/v1/series a bit for time ranges smaller than one day
2022-06-28 13:02:47 +03:00
Aliaksandr Valialkin
a963b2a0aa
all: show timeRange in traces in human-readable format instead of timestamps in milliseconds
2022-06-27 13:45:51 +03:00
Aliaksandr Valialkin
d502426d7c
app/vmalert: load static js and css from proper paths if -http.pathPrefix
command-line flag is set
...
This is a follow-up for b104f67beb
2022-06-27 13:45:51 +03:00
Aliaksandr Valialkin
ba514284f1
lib/storage: add querytracer to more contexts
...
querytracer has been added to the following storage.Storage methods:
- RegisterMetricNames
- DeleteMetrics
- SearchTagValueSuffixes
- SearchGraphitePaths
2022-06-27 13:45:51 +03:00
Aliaksandr Valialkin
134751e43e
all: locate throttled loggers via logger.WithThrottler() only once and then use them
...
This reduces the contention on logThrottlerRegistryMu mutex when logger.WithThrottler()
is called frequently from concurrent goroutines.
2022-06-27 13:45:50 +03:00
Roman Khavronenko
45f20ad1aa
vmalert: make __name__
available for templating in alerts ( #2783 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-06-27 09:57:56 +02:00
Aliaksandr Valialkin
9a314106ca
app/vmselect/netstorage: remove Get prefix from netstorage functions
...
This makes these function names more consistent with the server side
2022-06-27 00:45:05 +03:00
Roman Khavronenko
b104f67beb
vmalert: use absolute path for assets ( #2784 )
...
Using relative path breaks assets loading on alert view page.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-06-24 20:06:12 +02:00
Dmytro Kozlov
bb7f31541f
vmui: added query tracing ( #2748 )
...
* vmui: added query tracing
* vmui: updated ui
* vmui: update tracing logic, fix bugs, disable tracing by default
* vmui: use empty message as props
* vmui: fixed ui, added delete for each tacing data, show query in header
* vmui: added timelines
* vmui: speedup render
* vmui: use memo for sorting
* vmui: use Trace model, remove unused functions, simplify part of code
* vmui: update recursive logic
* vmui: fix set query to header
* vmui: code cleanup, remove unused code
* vmui: remove unused type, rename component
* wip
* wip
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-23 22:59:20 +03:00
Aliaksandr Valialkin
1c4f67c5d2
lib/promauth: add ability to send additional http headers in requests to scrape targets
...
This solves https://stackoverflow.com/questions/66032498/prometheus-scrape-metric-with-custom-header
2022-06-22 20:39:43 +03:00
Aliaksandr Valialkin
51362f9333
app/vmselect: add -search.setLookbackToStep
command-line flag for making the gap filling algorithm similar to InfluxDB data model
...
This option should override `-search.maxStalenessInterval` for most cases when users migrate from InfluxDB to VictoriaMetrics
2022-06-22 14:19:30 +03:00
Aliaksandr Valialkin
7bf75c7e61
app/vmselect: typo fix in the exported metric name: vm_http_request_total -> vm_http_requests_total
2022-06-22 13:15:31 +03:00
Roman Khavronenko
75dd7542e5
docs: follow-up for 197d3cdd74
( #2766 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-06-22 08:53:54 +02:00
云原生驿站
197d3cdd74
docs: supplement vmalert downsampling docs ( #2765 )
...
Co-authored-by: 吴典秋 <muti_kube@163.com>
2022-06-22 07:43:41 +02:00
Aliaksandr Valialkin
e6ed92529b
all: remove explicit "xxhash" name when importing github.com/cespare/xxhash/v2 package
...
This package already has the same name, so there is no need in explicit name
2022-06-21 20:23:32 +03:00
Aliaksandr Valialkin
f88c642464
docs: update -help
output for vmbackup, vmbackupmanager, vmgateway and vmrestore components
2022-06-21 15:49:01 +03:00
Aliaksandr Valialkin
cfc99e12da
docs: update docs after e4d6b750f6
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2753
2022-06-21 14:01:12 +03:00
Nikolay
e4d6b750f6
lib/httpserver: adds flagsAuthKey command-line flag ( #2758 )
...
* lib/httpserver: adds flagsAuthKey command-line flag
It protects /flags endpoint with authKey.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2753O
* Apply suggestions from code review
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-20 17:09:32 +03:00
Aliaksandr Valialkin
81d1497b4c
all: update Go builder for production builds from 1.18.2 to 1.18.3
...
See https://github.com/golang/go/issues?q=milestone%3AGo1.18.3+label%3ACherryPickApproved
2022-06-20 14:26:41 +03:00
Roman Khavronenko
4b4f03fa1f
docs: reference links from key concepts ( #2745 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-19 23:12:10 +03:00
Aliaksandr Valialkin
afc26c57cc
all: replace bash
with console
blocks in all the *.md files
...
This is a follow-up for 954a7a6fc6
2022-06-19 23:00:39 +03:00
Roman Khavronenko
ef7f52e0e6
Vmalert notifiers ( #2744 )
...
* vmalert: remove head of line blocking for sending alerts
This change makes sending alerts to notifiers concurrent instead
of sequential. This eliminates head of line blocking, where first
faulty notifier address prevents the rest of notifiers from
receiving notifications.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* vmalert: make default timeout for sending alerts 10s
Previous value of 1m was too high and was inconsistent
with default timeout defined for notifiers via
configuration file.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* vmalert: linter checks fix
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-06-18 09:11:37 +02:00
Dmytro Kozlov
10454d1735
vmui: added focusLabel, enable cardinality app configuratior ( #2736 )
...
* vmui: added focusLabel, enable app configuratior
* vmui: set focusLabel if {labelName!=""}
* wip
* docs/CHANGELOG.md: mention about focusLabel feature in cardinality explorer
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2730
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-17 13:03:02 +03:00
Roman Khavronenko
723d90536c
vmselect: limit end
param max value by 2d in future ( #2729 )
...
* vmselect: limit `end` param max value by 2d in future
The change is applied only to service handlers like `/labels` or `/series`
and limits the `end` param by max value <= now() + 2 days. The same limit
is applied for the ingested data, so no reason to allow to request data
in future far than that.
The change is also needed for corner cases like https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2669
where too high `end` value triggers inefficient global index search.
Signed-off-by: hagen1778 <roman@victoriametrics.com>
* docs/CHANGELOG.md: document the bugfix
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-16 20:46:31 +03:00
Aliaksandr Valialkin
eabd2e2320
docs/vmagent.md: typo fix: configued -> configured
2022-06-16 20:30:30 +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
Roman Khavronenko
45c1e27937
docs: add multiple-remote-writes topology to vmalert ( #2738 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-06-16 13:30:28 +02:00
Aliaksandr Valialkin
ec7963208d
app/vmselect: accept focusLabel
query arg at /api/v1/status/tsdb
...
This allows filling the seriesCountByFocusLabelValue list in the /api/v1/status/tsdb response
with label values for the specified focusLabel, which contain the highest number of time series.
TODO: add this to Cardinality explorer at VMUI - https://docs.victoriametrics.com/#cardinality-explorer
2022-06-14 18:36:54 +03:00
Aliaksandr Valialkin
b6c1ca12b7
lib/storage: show top labels with the highest number of series in cardinality explorer
2022-06-14 16:32:38 +03:00
Dmytro Kozlov
af3dc91a51
vmui: refactor Cardinality panel ( #2726 )
...
* vmui: refactor Cardinality panel
* vmui: change width of the search panel
* vmui: code cleanup
* vmui: code cleanup
* vmui: fixed vulnerability (npm audit fix)
* wip
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-14 14:39:47 +03:00
Aliaksandr Valialkin
7b3c9c50a8
docs: update command-line flags' descriptions according to recent changes
2022-06-14 13:28:00 +03:00
Wataru Manji
99dbe7f9d4
Add remote-write headers ( #2701 )
...
Co-authored-by: Wataru Manji <wataru.manji@linecorp.com>
2022-06-13 09:59:03 +03:00
Aliaksandr Valialkin
1041f395cc
app/vmagent: follow-up after 4583ed23a8
2022-06-13 09:54:11 +03:00
Dmytro Kozlov
4583ed23a8
Added a stub for datadog endpoint ( #2710 )
...
* Added a stub for datadog endpoint
* Update app/vmagent/main.go
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-13 09:52:13 +03:00
Yury Molodov
879670418f
vmui: enhancements ( #2638 ) ( #2717 )
...
* feat: make datepicker to be set to last 30 min by default
* fix: correct spinner while loading data
* feat: change legend style
* app/vmselect: `make vmui-update`
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-13 09:43:37 +03:00
Yury Molodov
7979e5cd26
vmui: fix relative time and query params ( #2716 )
...
* fix: correct update query params
* fix: change select relative time
2022-06-13 09:32:09 +03:00
Aliaksandr Valialkin
374beb350e
app/vmselect: optimize /api/v1/labels
and /api/v1/label/.../values
handlers when match[]
query arg is passed to them
2022-06-12 04:32:13 +03:00
Aliaksandr Valialkin
89b778902b
app/vmselect: add optional limit
query arg to /api/v1/labels
and /api/v1/label_values
endpoints
...
This arg allows limiting the number of sample values returned from these APIs
2022-06-10 09:50:33 +03:00
Aliaksandr Valialkin
483b402bb2
app/vmselect/prometheus: extract common code for obtaining common query args into getCommonParams() function
2022-06-09 20:34:18 +03:00
Aliaksandr Valialkin
2bcb960f17
all: improve query tracing coverage for indexdb search
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1403
2022-06-09 20:07:07 +03:00
Aliaksandr Valialkin
a30333a79e
app/vmselect/graphite: remove additional redundant Request.ParseForm() calls after 38c785b851
2022-06-09 13:28:57 +03:00
Aliaksandr Valialkin
38c785b851
app/vmselect: remove redundant calls to Request.ParseForm()
...
Request.ParseForm() is implicitly called by the first call to Request.FormValue()
2022-06-09 13:11:26 +03:00
Roman Khavronenko
48a60eb593
vmalert: followup for 76f05f8670
( #2706 )
...
Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-06-09 08:58:25 +02:00
Howie
76f05f8670
feat: rule limit ( #2676 )
...
vmalert: support `limit` param in groups definition
`limit` param limits number of time series samples produced by a single rule
during execution.
On reaching the limit rule will return an err.
Signed-off-by: lihaowei <haoweili35@gmail.com>
2022-06-09 08:21:30 +02:00
Aliaksandr Valialkin
12ac255dae
lib/querytracer: make it easier to use by passing trace context message to New and NewChild
...
The context message can be extended by calling Donef.
If there is no need to extend the message, then just call Done.
2022-06-08 21:06:52 +03:00
Dmytro Kozlov
018d2303c4
Cardinality explorer ( #2625 )
...
* Cardinality explorer
* vmui, vmselect: updated field name, added description to spinner
* make vmui-update
* updated const name, make vmui-update
* lib/storage: changes calculation for totalSeries values
* added static files
* wip
* wip
* wip
* wip
* docs/CHANGELOG.md: document cardinality explorer feature
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2233
Co-authored-by: f41gh7 <nik@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-08 18:43:05 +03:00
Aliaksandr Valialkin
a93deb307f
docs/CHANGELOG.md: document https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2685
2022-06-07 15:39:13 +03:00
Wataru Manji
6564dc6c16
add Content-Encoding Header ( #2685 )
...
Co-authored-by: Wataru Manji <wataru.manji@linecorp.com>
2022-06-07 15:33:21 +03:00
Aliaksandr Valialkin
638ba4614a
docs/CHANGELOG.md: document e755d0ec3f
2022-06-07 15:16:48 +03:00
elProxy
e755d0ec3f
Support legacy datadog agent ( #2670 )
...
dd-agent v5 can issue some requests with trailing slashes.
(e.g.
526559be73/ddagent.py (L303)
)
Trim trailing slashes for request on /datadog/ paths to accomodate for
that.
Co-authored-by: Pierre Rossi <pierre.rossi@schibsted.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-06-07 15:06:18 +03:00
Aliaksandr Valialkin
8608dd093c
all: follow-up after 8edb390e21
...
- Remove unused js bloatware from /targets page. This strips down binary size by more than 100Kb
- Add /service-discovery page for API compatibility with Prometheus
- Properly load bootstrap.min.css from /prometheus/targets
- Serve static contents for /targets page from app/vminsert instead of app/vmselect, because /targets page is served from there
2022-06-07 00:57:09 +03:00
Aliaksandr Valialkin
0922ed2b7e
lib/promscrape: add -promscrape.cluster.name
command-line flag
...
This flag is used for proper data de-duplication when the same target is scraped
from multiple vmagent clusters.
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2679
2022-06-04 00:37:01 +03:00
Dmytro Kozlov
8edb390e21
lib/promscrape: adds service discovery visualization for /targets page( #2675 )
...
* lib/promscrape: updated template
* lib/promscrape: fixed click on unhealthy and all btns
* app/vmselect: jquery scripts into static folder
Co-authored-by: f41gh7 <nik@victoriametrics.com>
2022-06-03 15:38:45 +02:00