Aliaksandr Valialkin
5d255846ac
all: add go:build
lines for Go1.17
...
See https://tip.golang.org/doc/go1.17#gofmt for more details
2021-07-26 15:50:46 +03:00
Aliaksandr Valialkin
3921d8afae
app/vmselect: prevent from possible deadlock when f callback blocks inside RunParallel
2021-07-26 15:50:45 +03:00
Aliaksandr Valialkin
c3e6ce1db9
app/vmselect: make vmui-update
after a91d41f12a
2021-07-26 10:32:01 +03:00
Yury Molodov
401de2dca4
Vmui/query editor ( #1472 )
...
* fix: move request button to server input
* feat: add switch for query autocomplete
* refactor: rename state for popover open
* feat: add detect os by userAgent
* fix: change hotkey to run query for mac
* fix: change detect mac os
* fix: change div to span inside Typography
Co-authored-by: yury <yurymolodov@victoriametrics.com>
2021-07-23 21:08:58 +03:00
Aliaksandr Valialkin
b047feeb8b
app/vmselect/promql: properly handle (a op b) default N
if (a op b)
returns NaN series
...
The result should be a series with `N` values and `a op b` labels. Previously such series has been removed from the result.
2021-07-16 01:44:24 +03:00
Aliaksandr Valialkin
b92702f6d5
app/vmselect/netstorage: use more scalable algorithm for ditributing the work among among multiple channels on systems with big number of CPU cores
2021-07-16 00:35:36 +03:00
Aliaksandr Valialkin
df117f85bd
app/vmselect: do not track queries with less than 1ms execution time at /api/v1/status/top_queries
...
This should improve the readability and usefullness of the /api/v1/status/top_queries when debugging slow queries
or queries that take too much cpu time.
2021-07-15 16:53:35 +03:00
Aliaksandr Valialkin
5830ce2706
app/vmselect/netstorage: add -search.maxSamplesPerSeries
command-line option for limiting the number of samples a query can process per each series
...
This should prevent from out of memory crashes like in https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1067
2021-07-15 16:53:35 +03:00
Aliaksandr Valialkin
6c42db87a8
app/vmselect/netstorage: improve scalability of series unpacking on multi-CPU systems
2021-07-15 15:40:53 +03:00
Aliaksandr Valialkin
3059e4feec
app/vmui/README.md: typo fix: naviate->navigate
2021-07-15 15:02:56 +03:00
Aliaksandr Valialkin
9add9d86a6
app/vmselect/promql: duration handling improvements in MetricsQL queries
...
- Support durations anywhere in MetricsQL queries. E.g. sum_over_time(m[1h])/1h is equivalent to sum_over_time(m[1h])/3600
- Support durations without suffix. E.g. rate(m[300]) is equivalent to rate(m[5m])
2021-07-12 17:19:32 +03:00
Aliaksandr Valialkin
d98e22fe50
app/vmalert: accept Prometheus-like durations in interval
config option inside group
section
2021-07-12 12:36:22 +03:00
Aliaksandr Valialkin
f5fa177141
Revert "app/vmselect: expose vmui at /select/<accountID>/prometheus/vmui additionally to /select/<accountID>/vmui"
...
This reverts commit 885a79def6799f288e14df05b35a12569659ab85.
Reason for revert: Grafana doesn't allows accessing /select/<accountID>/prometheus/vmui :(
2021-07-12 09:08:43 +03:00
Aliaksandr Valialkin
ddaa12050d
app/vmselect: expose vmui at /select/<accountID>/prometheus/vmui additionally to /select/<accountID>/vmui
...
The /select/<accountID>/prometheus/vmui is needed for accessing via server-side Prometheus datasource for Grafana.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1413
2021-07-10 12:52:25 +03:00
Aliaksandr Valialkin
0b98f6c7ff
app/vmselect: expose vmui at /vmselect/<accountID>/vmui/
instead of /vmselect/<accountID>/prometheus/vmui/
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1413
2021-07-10 12:32:21 +03:00
Aliaksandr Valialkin
98e049ba6d
app/vmui: move source code from https://github.com/VictoriaMetrics/vmui to app/vmui
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1413
2021-07-09 17:13:51 +03:00
Aliaksandr Valialkin
2c5e1cd893
app/vmselect: move web ui from /ui to /select/<accountID>/prometheus/ui
...
This way the UI is available for every tenant (aka accountID) and the UI can automatically determine the needed per-tenant datasource path from page referer.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1413
2021-07-08 13:14:50 +03:00
Aliaksandr Valialkin
acb7a95c64
app/vmselect: follow-up after aa11ef6d3b
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1413
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4
2021-07-07 17:45:09 +03:00
tony
aa11ef6d3b
add vmui for vmselect component ( #1431 )
...
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2021-07-07 17:04:23 +03:00
Aliaksandr Valialkin
9c19719ad6
app/{vminsert,vmselect}: export vminsert_request_duration_seconds and vmselect_request_duration_seconds histograms
2021-07-07 13:27:23 +03:00
Aliaksandr Valialkin
ceda2b1df4
lib/httpserver: print full requestURI in httpserver.Errorf
...
This should simplify debugging.
2021-07-07 13:11:29 +03:00
Aliaksandr Valialkin
22c6e64bbc
lib/storage: consistency renaming: tagCache -> tagFiltersCache
...
This improves code readability
2021-07-06 11:03:30 +03:00
Aliaksandr Valialkin
44855f0c9b
app/{vmselect,vmstorage}: clarify the description for -dedup.minScrapeInterval
command-line flag
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1426
2021-07-02 15:06:41 +03:00
Aliaksandr Valialkin
4d8ab5d9fa
docs/vmagent.md: mention about docker_sd_config support
2021-06-25 20:53:09 +03:00
Aliaksandr Valialkin
856aecae05
app/vmselect/promql: return the last timestamp for the max / min value from tmax_over_time()
and tmin_over_time()
function as most users expect
2021-06-23 14:18:37 +03:00
Aliaksandr Valialkin
c18017a9c3
app/vminsert/netstorage: sort the -storageNode
list passed to vminsert
nodes
...
This should reduce resource usage (CPU, RAM, disk IO) at vmstorage nodes
if the addresses of vmstorage nodes are passed in random order to vminsert nodes.
2021-06-23 14:00:08 +03:00
Nikolay
e03a3d3a36
adds http_sd ( #1399 )
...
* adds http_sd
* adds X-Prometheus-Refresh-Interval-Seconds header
* Update lib/promscrape/discovery/http/api.go
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2021-06-22 13:42:09 +03:00
Roman Khavronenko
79474baf99
vmctl: add more context to flags description in vm-native mode ( #1395 )
2021-06-18 19:20:52 +03:00
Aliaksandr Valialkin
b92d110cad
app/vmselect: log slow requests to all the /api/v1/*
handlers if their execution time exceeds -search.logSlowQueryDuration
2021-06-18 19:07:03 +03:00
Aliaksandr Valialkin
4acc4602b3
app/vmctl: limit JSON line size by 10K samples ( #1394 )
...
This should reduce the maximum memory usage at VictoriaMetrics when importing time series with big number of samples.
2021-06-18 15:41:34 +03:00
Aliaksandr Valialkin
60bc35f550
docs/{vmgateway,vmbackupmanager}: explicitly mention that these components are a part of an enterprise package
2021-06-17 17:19:13 +03:00
Aliaksandr Valialkin
51fc469642
app/vmagent/remotewrite: go fmt
after 0a796f7c3a
2021-06-17 13:51:40 +03:00
Zongyang
cf506e300d
Change default value of '-remoteWrite.queues' to cgroup.AvailableCPUs * 2 ( #1385 )
...
* Change default value of '-remoteWrite.queues' to cgroup.AvailableCPUS() * 2 to reduce scrape interval
Default value of vmagent option '-remotewrite.queues' is 4 and default
size of vmagent ScheudleUnmarshalWorkers is number of CPUs, when available
CPUs is much greater than 4, e.g 32, worker are competing push queues
which will increase scrape interval and may cause scrape timeout.
* Update README and flag description
Co-authored-by: xiaozy <xiaozy01@fenbi.com>
2021-06-16 12:37:55 +03:00
Roman Khavronenko
a15c947045
promql: fix increase_pure
calculation for cases with stale series ( #1381 )
...
Due to staleness handling, increase_pure were using incorrect previous value
during calculation in cases where series disappears for period longer
than staleness period and then returns back. The fix suppose to account
for a real datapoint value before staleness takes place. The fix should
remove unexpected spikes while using `increase_pure` for staled series.
2021-06-15 17:37:51 +03:00
Nikolay
e42da47608
adds digital ocean sd ( #1376 )
...
* adds digital ocean sd config
* adds digital ocean sd
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1367
* typo fix
2021-06-14 13:19:29 +03:00
Roman Khavronenko
c5f493db8e
Vmalert docs ( #1372 )
...
* vmalert: mention what happens if `for` is set to 0 or omitted
* vmalert: add more context to docs
2021-06-14 11:43:01 +03:00
Aliaksandr Valialkin
0672cfffa2
app/vmauth: properly handle http.ErrAbortHandler panic
...
This panic can be raised by the reverseProxy on aborted request to the backend.
So handle it (e.g. suppress) at reverseProxy.ServeHTTP call.
Do not suppress the panic at lib/httpserver generic HTTP handler,
since it may result in an inconsistent state left after the panicking handler.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1353
2021-06-11 12:54:37 +03:00
Roman Khavronenko
f3cb2158a3
vmalert: fix mistake with object reuse while parsing response ( #1370 )
...
* vmalert: fix mistake with object reuse while parsing response
During the refactoring, the wrong optimisations was applied in
parse function which caused metric fields reset. The change removes
optimisation.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1369
* vmalert: add test to cover multiple metrics in one response
2021-06-11 11:30:07 +03:00
John Belmonte
3e79f3994e
spelling fix: synonym ( #1363 )
2021-06-11 10:58:48 +03:00
Aliaksandr Valialkin
e8e7f03394
app/vmselect/promql: typo fix in the comment
2021-06-09 18:34:57 +03:00
Aliaksandr Valialkin
247b2a5a08
app/vmauth: improve readability for a config with multiple src_paths
2021-06-09 15:38:09 +03:00
Aliaksandr Valialkin
520d62ade2
docs/vmagent.md: mention that vmagent supports scrape targets sharding
2021-06-09 12:30:54 +03:00
Aliaksandr Valialkin
f3749dedba
docs: document rules replay feature for vmalert
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/836
This is a follow-up for 2a259ef5e7
2021-06-09 12:30:54 +03:00
Roman Khavronenko
5aa7846900
vmalert: support rules backfilling (aka replay
) ( #1358 )
...
* vmalert: support rules backfilling (aka `replay`)
vmalert can `replay` configured rules in the past
and backfill results via remote write protocol.
It supports MetricsQL/PromQL storage as data source,
and can backfill data to remote write compatible
storage.
Supports recording and alerting rules `replay`. See more
details in README.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/836
* vmalert: review fixes
* vmalert: readme fixes
2021-06-09 12:30:54 +03:00
Aliaksandr Valialkin
2c6b917749
app/vminsert/netstorage: update storageNode.lastRerouteTime before the rerouting
...
This is needed for reliable detection of storage nodes with recent rerouting
2021-06-08 12:06:32 +03:00
Aliaksandr Valialkin
0d067eb112
app/vminsert/netstorage: tune re-routing algorithm
...
Do not re-route data to unavailable storage node. Send it to the remaining storage nodes instead
even if they cannot keep up with the load. This should spread the load more evenly among available
storage nodes.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/791
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1054
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1165
2021-06-05 16:23:44 +03:00
Aliaksandr Valialkin
269e35d676
app/{vmagent,vminsert}: follow-up after 2fe045e2a4
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1343
2021-06-04 20:33:22 +03:00
jelmd
d8b46908db
new feature: debug relabeling ( #1344 )
...
* new feature: relabel logging
Use scrape_configs[x].relabel_debug = true to log metric names inkl.
labels before and after relabeling. After relabeling related metrics
get dropped, i.e. not submitted to servers.
* vminsert wants relabel logging, too.
2021-06-04 20:33:21 +03:00
Aliaksandr Valialkin
1c09e71f5b
app/vminsert: add -disableRerouting
command-line flag for disabling re-routing if some vmstorage nodes have lower performance than the others
...
Refactor the rerouting mechanism and make it more resilient to cases when some of vmstorage nodes are temporarily unavailable.
Reduce the probability of rerouting storm.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/791
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1054
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1165
2021-06-04 04:33:52 +03:00
Aliaksandr Valialkin
8cdecfc52c
app/vmauth: allow balancing the load among multiple backend nodes by specifying multiple urls in url_prefix
config
2021-05-29 01:04:22 +03:00