Aliaksandr Valialkin
dcac849c1f
app/vmagent/remotewrite: sort labels before sending the series to per-remoteWrite.url queues
2021-05-20 11:54:06 +03:00
Neo He
c5ab00ebee
app/{vmbackup,vmrestore},docs/vmrestore.md: typo fix: vbackup -> vmbackup ( #1305 )
2021-05-18 16:38:15 +03:00
Aliaksandr Valialkin
74ef40034c
lib/httpserver: typo fix in -http.shutdownDelay
command-line flag description: servier -> server
2021-05-18 16:25:27 +03:00
Aliaksandr Valialkin
1668280e67
docs/vmalert.md: document multitenant support
...
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/740
2021-05-18 16:25:21 +03:00
Aliaksandr Valialkin
7fe362deb1
app/vmauth: reload -auth.config
on the request to /-/reload
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1194
2021-05-18 02:24:37 +03:00
Aliaksandr Valialkin
25ca108642
docs/vmbackup.md: typo fix: snaphosts -> snapshots
...
Thanks to @jelmd - see 1ab27582a3 (r50884395)
2021-05-18 01:14:01 +03:00
Aliaksandr Valialkin
6ea191d196
docs: dealay -> delay
2021-05-18 01:07:32 +03:00
Roman Khavronenko
3428df6f15
vmalert: use stringified label keys for duplicates map in recroding rules ( #1301 )
...
duplicates map helps to determine wheter extra labels has overriden
labels which make time series unique. It was using a sorted hashed
labels sequence as a key. But hashing algorithm could have collisions,
so it is more convenient to not use hashing at all.
Log message for recording rules duplicates was improved as well.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1293
2021-05-17 01:51:48 +03:00
Aliaksandr Valialkin
a6cb4f10a7
app/{vmalert,vmauth}: explicitly set MaxIdleConnsPerHost in net/http.Client.Transport
...
By default MaxIdleConnsPerHost is set to 2. This limits the possibility to re-use http keep-alive connections.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1300
2021-05-14 18:13:34 +03:00
Aliaksandr Valialkin
23afbd5094
app/vmagent/remotewrite: clarify the comment explaining why vmagent drops blocks if remote storage returns 400 or 409 status code
2021-05-13 16:17:09 +03:00
Aliaksandr Valialkin
2839055513
lib/storage: substitute GetTSDBStatusForDate with GetTSDBStatusWithFiltersForDate with nil tfss
2021-05-13 09:01:05 +03:00
Nikolay
be87be34a4
Adds tsdb match filters ( #1282 )
...
* init work on filters
* init propose for status filters
* fixes tsdb status
adds test
* fix bug
* removes checks from test
2021-05-12 17:16:58 +03:00
Aliaksandr Valialkin
56b08390f6
app/vmselect/promql: allow to use 2x more memory for query processing in cluster mode compared to single-node mode
...
`vmselect` has no `vmstorage`-related caches. So it can use more memory for query processing compared to single-node VictoriaMetrics.
2021-05-12 14:43:49 +03:00
Aliaksandr Valialkin
cca9670573
docs/CHANGELOG.md: document -datasource.roundDigits
added at 5c448126dc
2021-05-10 11:18:58 +03:00
Roman Khavronenko
a7f00101f5
vmalert: add support for round_digits
param in datasource package ( #1278 )
...
Starting from v1.56.0 VM supports `round_digits` which allows to limit
the number of digits after the decimal point in response value. The feature
can be used to reduce entropy of produced by recording rules values
and significantly improve the compression. See more details in link below.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/525
2021-05-10 11:18:56 +03:00
Roman Khavronenko
35237fe1f5
vmalert: fix error when rule didn't start if restore failed ( #1279 )
...
Previously, `startGroup` could exit on restore errors despite the
`remoteRead.ignoreRestoreErrors` flag value. Now vmalert checks the
flag value before deciding whether to return error or just log it.
2021-05-10 11:10:32 +03:00
Aliaksandr Valialkin
2dddd68feb
docs/vmagent.md: add stream parsing mode
chapter
2021-05-08 23:14:47 +03:00
Aliaksandr Valialkin
9c505d27dd
lib/ingestserver: properly close incoming connections during graceful shutdown
2021-05-08 19:53:45 +03:00
Aliaksandr Valialkin
4a5f45c77e
app/vminsert: add support for data ingestion via other vminsert nodes
2021-05-08 19:53:45 +03:00
Aliaksandr Valialkin
07bc021f58
app/vmalert: add missing comment for ErrStateRestore
2021-05-08 19:53:45 +03:00
Aliaksandr Valialkin
e8478e1e97
app/vmbackup: make sure that -snapshotName
isnt set if -snapshot.createURL
is set
2021-05-07 08:44:44 +03:00
Roman Khavronenko
bb7e113dd4
vmalert: add flag to control behaviour on startup for state restore errors ( #1265 )
...
Alerting rules now can return specific error type ErrStateRestore to indicate
whether restore state procedure failed. Such errors were returned and logged
before as well. But now user can specify whether to just log these errors
(remoteRead.ignoreRestoreErrors=true) or to stop the process
(remoteRead.ignoreRestoreErrors=false). The latter is important when VM isn't
ready yet to serve queries from vmalert and it needs to wait.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1252
2021-05-05 12:24:32 +03:00
Aliaksandr Valialkin
0a2e746175
docs/vmalert.md: update docs after afca7b430c
2021-04-30 11:49:40 +03:00
Roman Khavronenko
7394967841
vmalert: fix the typo in ApplyParams func ( #1259 )
2021-04-30 11:47:11 +03:00
Roman Khavronenko
6fbedd62b8
vmalert: use rule's evaluationInterval
as step
param by default ( #1258 )
...
User still can override param by specifying `datasource.queryStep` flag.
2021-04-30 10:03:50 +03:00
Aliaksandr Valialkin
daf2778025
docs/CHANGELOG.md: document the change from f3a048288e
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1232
2021-04-30 09:56:47 +03:00
Roman Khavronenko
b55677e93d
Vmalert: adjust time
param for datasource queries according to evaluationInterval
( #1257 )
...
* Simplify arguments list for fn `queryDataSource` to improve readbility
* vmalert: adjust `time` param according to rule evaluation interval
With this change, vmalert will start to use rule's evaluation interval
for truncating the `time` param. This is mostly needed to produce consistent
time series with timestamps unaffected by vmalert start time. Now, timestamp
becomes predictable.
Additionally, adjustment is similar to what Grafana does for plotting range graphs.
Hence, recording rule series and recording rule expression plotted in grafana
suppose to become similar in most of cases.
2021-04-30 09:56:46 +03:00
Aliaksandr Valialkin
8be1cb297b
app/vmagent: list user-visible endpoints at
http://vmagent:8429/
...
While at it, use common WriteAPIHelp function for the listing in vmagent, vmalert and victoria-metrics
2021-04-30 09:38:23 +03:00
Nikolay
2eb8ef7b2b
changes vmalert Querier with per rule querier ( #1249 )
...
* changes vmalert Querier with per rule querier
it allows to changes some parametrs based on rule setting
for instance - alert type, tenant for cluster version or event endpoint url.
2021-04-29 11:31:07 +03:00
Roman Khavronenko
0ceb4f7565
vmalert: keep the returned timestamp when persisting recording rule ( #1245 )
...
Previously, vmalert used `lastExecTime` timestamp when writing recording rules
to the remote storage. This may be incorrect, if vmalert uses `datasource.lookback` flag,
which means rule's expression will be executed at some moment in the past.
To avoid such situations, vmalert now will use returned timestamp instead of `lastExecTime`.
2021-04-27 00:16:45 +03:00
Aliaksandr Valialkin
e309b5a83b
app/vmagent/remotewrite: increase the maximum possible number of inmemory blocks for systems with high amounts of RAM
...
This should reduce the probability of using much slower file-based persistent queue
when vmagent processes metrics at high rate (millions of metrics per second).
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1235
2021-04-23 22:05:00 +03:00
Aliaksandr Valialkin
f92db26a93
app/vmagent/remotewrite: count maxLabelsPerBlock as 10x of maxRowsPerBlock
...
This should increase block sizes and subsequently increase the maximum possible bandwidth per each connection to remote storage.
This, in turn, should reduce the probability of storing the data in local buffers.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1235
2021-04-23 22:05:00 +03:00
Aliaksandr Valialkin
aaee80d158
app/vmbackup: typo fix: snaphsot -> snapshot
...
Follow-up for 9de0fa3649
2021-04-22 11:18:13 +03:00
Aliaksandr Valialkin
e7c4fde756
app/vmauth: parse url_prefix
only once during config load
2021-04-21 10:57:17 +03:00
Aliaksandr Valialkin
6dc5d3b357
all: rename https://victoriametrics.github.io to https://docs.victoriametrics.com
2021-04-20 20:20:01 +03:00
Aliaksandr Valialkin
64f1ddefe5
all: consistency renaming Victoria Metrics
-> VictoriaMetrics
...
VMInsert -> vminsert
VMSelect -> vmselect
VMStorage -> vmstorage
2021-04-20 11:45:02 +03:00
Aliaksandr Valialkin
8d869d112b
app/vmauth: follow-up for 6a81a89b3d
2021-04-20 10:59:22 +03:00
Nikolay
7d249d787d
adds query params support for vmauth urlPrefix ( #1226 )
...
* adds query params support for vmauth urlPrefix
* Update app/vmauth/example_config.yml
* Update app/vmauth/example_config.yml
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2021-04-20 10:59:20 +03:00
Aliaksandr Valialkin
bdcd978d56
app/vmctl: update README.md according to bfecd0fd55
2021-04-16 12:10:00 +03:00
Aliaksandr Valialkin
c872ba45b9
docs: update -help
output after the commit 77be3e3a82
2021-04-12 12:35:39 +03:00
Artem Navoiev
c3dcfdef8c
improve docs for cli flags ( #1202 )
...
* improve docs for cli flags
* improve docs for cli flags.2
2021-04-12 12:28:36 +03:00
Aliaksandr Valialkin
2190fd2148
docs: make docs-sync
2021-04-10 19:55:05 +03:00
Aliaksandr Valialkin
0f7ece84f3
app/vmstorage/transport: reduce memory allocations on data ingestion path
2021-04-10 17:36:00 +03:00
Roman Khavronenko
46e6fdb131
Docs update ( #1199 )
...
* docs: drop table of contents for `vmctl`
We already have it autogenerated on .github.io, so no need to keep it.
* docs: mention OpenTSDB migration feature for vmctl
* docs: sync docs for `vmalert`
2021-04-10 15:47:52 +03:00
John Seekins
9e7bf595a0
Improve documentation on OpenTSDB migration tool and fix a bug with hard offsets ( #1198 )
...
* add more documentation on OpenTSDB migration explaining what chunking means
* more clarification of OpenTSDB aggregations
* break out what a retention string becomes
* add more docs around retention strings
* add example of running program and fix mistake in how hard offsets are handled
* fix formatting
2021-04-10 15:28:56 +03:00
John Seekins
97fafce028
OpenTSDB migration to VictoriaMetrics ( #1089 )
2021-04-10 15:28:54 +03:00
Roman Khavronenko
712725b4a5
vmalert: document template functions and mention them in README ( #1197 )
2021-04-08 18:20:57 +03:00
Aliaksandr Valialkin
e48fd5776b
app/vmselect/promql: fix tests after d3fa0ccabd
2021-04-08 00:17:40 +03:00
Aliaksandr Valialkin
f90bf265f4
app/vmselect/promql: properly detect aggregate topk*
and bottomk*
aggregate functions in order to disable duplicate sorting
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1189
2021-04-08 00:10:33 +03:00
Aliaksandr Valialkin
9ce3b7e1dd
app/vmselect: return data:null
instead of data:[]
from /api/v1/query_exemplars
, since Grafana throws an error otherwise
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1186
2021-04-07 23:34:01 +03:00
Aliaksandr Valialkin
3d5f1f779f
app/vmselect: do not sort series returned from topk*
and bottomk*
functions, since these series are already sorted in user-expected order
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1189
2021-04-07 14:16:02 +03:00
Roman Khavronenko
ff3711eea2
docs: update docs ordering and formatting ( #1192 )
...
The major change is adding `sort` directive to docs. For those docs which are copied
from internal packages `sort` is added via makefile command. For the rest it is added
manually since they're updated manually as well.
The rest of changes is connected with markdown formatting. For example, changing headers
in some files (`##` => `#`) makes navigation on .github.io to look better. This especially
useful for `changelog` docs.
Table of contents for `vmctl` is dropped, since we already have it autogenerated on .github.io.
No link changes expected. The corresponding PR to `cluster` branch will be made in follow-up PR.
2021-04-07 13:43:01 +03:00
Aliaksandr Valialkin
7fce4e9fb4
app/vmselect: return dumb response on /api/v1/query_exemplars
request
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1186
2021-04-05 23:28:21 +03:00
Aliaksandr Valialkin
2585058a5f
Makefile: prepare arm64
and amd64
release archives for cluster version on make release
command
2021-04-05 23:01:45 +03:00
Aliaksandr Valialkin
92d4c80639
docs/vmagent.md: mention that vmagent supports scraping via socks5 proxy
2021-04-04 01:45:46 +03:00
Aliaksandr Valialkin
ab9e1eb41f
lib/promscrape: support for simple HTTP proxies without CONNECT
method support such as https://github.com/prometheus-community/PushProx
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1179
2021-04-04 00:40:58 +03:00
Aliaksandr Valialkin
4aa59cae7c
app/vmselect/promql: do not delete dst_label
if src_label
is empty in label_copy(q, src_label, dst_label)
and label_move(q, src_label, dst_label)
2021-04-03 22:06:50 +03:00
Aliaksandr Valialkin
dfec690548
docs/vmgateway.md: update docs
2021-04-03 00:29:57 +03:00
Aliaksandr Valialkin
b9469de410
app/vmselect/promql: add ability to set label value additionally to label name for the remaining sum of time series returned from topk_*
and bottomk_*
functions in the form: topk_min(N, m, "label=value")
2021-04-02 23:56:30 +03:00
Aliaksandr Valialkin
262da1c2e5
docs/{vmauth,vmgateway}.md: small fixes
2021-04-02 23:15:40 +03:00
Aliaksandr Valialkin
5edec0e57e
app/vmgateway: publish docs
2021-04-02 23:10:10 +03:00
Aliaksandr Valialkin
4028d692f5
app: do not process non-GET requests on at /
handler
2021-04-02 22:56:38 +03:00
Aliaksandr Valialkin
89771d082d
app/vmauth: add support for authorization via Authorization: Bearer <token>
2021-04-02 22:15:07 +03:00
Aliaksandr Valialkin
6c6174271a
docs/vmagent.md: mention about proxy_authorization section
2021-04-02 21:24:52 +03:00
Aliaksandr Valialkin
87700f1259
lib/promscrape: add support for authorization
config in -promscrape.config
as Prometheus 2.26 does
...
See https://github.com/prometheus/prometheus/pull/8512
2021-04-02 21:20:37 +03:00
Aliaksandr Valialkin
31d3d02d25
app/vmselect/promql: remove the limit on the number of time series that can be sorted, since it may confuse users
...
Always sort time series returned from `/api/v1/query` and `/api/v1/query_range` unless `sort_*` function is used at top level of the query.
2021-04-02 16:50:02 +03:00
Aliaksandr Valialkin
512addc608
app/{vminsert,vmagent}: add -sortLabels
command-line option for sorting time series labels before ingesting them in the storage
...
This option can be useful when samples for the same time series are ingested with distinct order of labels.
For example, metric{k1="v1",k2="v2"} and metric{k2="v2",k1="v1"}.
2021-03-31 23:27:21 +03:00
Aliaksandr Valialkin
ae1c653d55
lib/storage: reduce memory usage when ingesting samples for the same time series with distinct order of labels
2021-03-31 21:22:40 +03:00
Aliaksandr Valialkin
392ba94d1d
app/vmagent/remotewrite: reduce memory usage when -remoteWrite.queues
is set to a big value
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1167
2021-03-31 16:17:23 +03:00
Aliaksandr Valialkin
b873b965af
app/vmagent/remotewrite: reduce memory usage when samples with big number of labels are sent to remote storage
2021-03-31 00:45:42 +03:00
Aliaksandr Valialkin
d8c769e6af
app/vmselect: add -search.maxStatusRequestDuration
command-line flag for limiting the duration of requests to /api/v1/status/*
and /api/v1/series/count
2021-03-30 21:39:32 +03:00
Aliaksandr Valialkin
0e29d48628
app/vmselect: remove mentioning for -search.storageTimeout
from command-line flag descriptions
...
This is a follow-up for ecfd6fe78d
2021-03-30 15:07:40 +03:00
Aliaksandr Valialkin
ecfd6fe78d
app/vmselect: remove -search.storageTimeout
command-line flag, since it has the same meaning as -search.maxQueryDuration
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/711
2021-03-30 14:54:36 +03:00
Aliaksandr Valialkin
7bafaad46d
app/vmselect: prevent from possible incomplete query results after timed out query
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/711
2021-03-30 13:34:57 +03:00
Aliaksandr Valialkin
9b4e608199
app/vminsert: return back type
label to per-tenant metric `vm_tenant_inserted_rows_total
...
The `type` label has been removed in the commit 022fe4efd0
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/932
2021-03-30 00:06:59 +03:00
Aliaksandr Valialkin
0a8f0a4e2f
all: increase minimum supported Go version for building VictoriaMetrics components from v1.14 to v1.15
...
This is needed after the commit c0ac740f93
, which uses URL.Redacted() method,
which has been added in v1.15.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1147
2021-03-29 23:06:36 +03:00
Aliaksandr Valialkin
3f0534c7f8
app/vminsert/opentsdbhttp: remove rowsInsertedTenant metric, since it is substituted by tenantmetrics.RowsInsertedByTenant in the commit 022fe4efd0
2021-03-29 12:16:13 +03:00
Nikolay
022fe4efd0
makes tenant metrics names consistent with enterprise version ( #1152 )
2021-03-29 11:59:04 +03:00
Aliaksandr Valialkin
8a3939e93e
docs: document that vmagent drops data blocks when remote storage replies with 400 and 409 http status codes
...
This is a follow up for 1b7dc1e5a5
.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1149
2021-03-26 14:43:41 +02:00
Aliaksandr Valialkin
3fedf680f8
app/vmagent/remotewrite: remove superflouos code after 1b7dc1e5a5
2021-03-26 14:01:37 +02:00
Nikolay
15ff1f3a94
Adds blocks drop ( #1151 )
...
* adds blocks drop at 400 BadRequest status code
recieved from remote storage,
not expected that remote storage will be able to handle it on retry
* removes error logging for dropped blocks,
its expected error
2021-03-26 14:01:37 +02:00
Aliaksandr Valialkin
698ccca6ad
app/vmselect/prometheus: explain why partial responses are disallowed during data export
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1148
2021-03-25 18:39:07 +02:00
Aliaksandr Valialkin
b91e18af0e
docs/vmagent.md: add an example for -remoteWrite.label
2021-03-25 17:59:30 +02:00
Aliaksandr Valialkin
82047be90b
docs: add a link to the repository from build instruction for all the VictoriaMetrics components
2021-03-25 17:16:55 +02:00
Aliaksandr Valialkin
6de36b4e21
docs/vmagent.md: cosmetic fixes
2021-03-25 17:11:10 +02:00
Aliaksandr Valialkin
1b13d02728
docs/vmagent.md: cosmetic fixes
2021-03-25 16:54:37 +02:00
Aliaksandr Valialkin
155cd90fc8
docs/vmagent.md: typo fix: tupically -> typically
2021-03-25 16:48:27 +02:00
Aliaksandr Valialkin
450e23533d
docs/vmalert.md: remove misleading -evaluationInterval=3s
from example config args
...
3s evaluation interval is too small for practical setups. It can result in increased load on datasource.
So it is better to remove it from example config args, which are usually copy-pasted by novice users.
2021-03-25 15:31:10 +02:00
Aliaksandr Valialkin
b473c21915
app/vmselect/promql: do not merge time series during requests to /api/v1/query
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1141
2021-03-25 13:56:23 +02:00
Aliaksandr Valialkin
6b1f807418
app/vmagent: add -promscrape.consul.waitTime
command-line flag for configuring Consul service discovery wait time
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1144
2021-03-23 19:34:12 +02:00
Aliaksandr Valialkin
2041008d64
app/vmagent: mention -remoteWrite.maxDiskUsagePerURL in the descriptio of -remoteWrite.tmpDataPath
flag
2021-03-23 16:38:41 +02:00
Aliaksandr Valialkin
d1e773266f
app/vmselect/graphite: accept and enforce extra_label
in all the Graphite APIs
2021-03-23 15:30:15 +02:00
Aliaksandr Valialkin
27bb614016
app/vmselect: move getEnforcedTagFiltersFromRequest to searchtuils, since it will be used in Graphite functions soon
2021-03-23 14:57:57 +02:00
Aliaksandr Valialkin
7f9863254d
app/vmselect: improve description for -search.maxPointsPerTimeseries
command-line flag
2021-03-22 16:44:36 +02:00
Aliaksandr Valialkin
6ebf18ab97
app/{vminsert,vmagent}: use Influx field as metric name if measurement is empty and -influxSkipSingleField command-line is set
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1139
2021-03-22 13:55:11 +02:00
Aliaksandr Valialkin
92531a38c4
app/vmselect/promql: increment key prefix for faster reset for rollup result cache
2021-03-22 11:59:39 +02:00
Aliaksandr Valialkin
799461d8bf
app/vmselect/graphite: follow-up after 529d7be26b
2021-03-18 16:33:00 +02:00
Nikolay
8807410a00
changes metricsFind api ( #1137 )
...
it should be able mitigate crash if label value contains *,[ or { symbols
2021-03-18 16:32:59 +02:00
Aliaksandr Valialkin
667d129e1e
app/vmselect/promql: typo fix after 9666834045
2021-03-17 15:11:54 +02:00
Aliaksandr Valialkin
69201806f8
app/vmselect/promql: merge adjancent buckets with the smallest summary number of hits in buckets_limit()
function
...
This should improve accuracy for the returned buckets
2021-03-17 14:31:29 +02:00
Aliaksandr Valialkin
8ef1184adf
app/vmstorage: add vm_index_search_duration_seconds
histogram for monitoring the performance of index search
2021-03-17 01:13:15 +02:00
Aliaksandr Valialkin
5e77a939c2
all: make go vet
happy
2021-03-17 00:48:44 +02:00
Aliaksandr Valialkin
b997f4a418
all: make golangci-lint happy after the commit 6378205415
2021-03-17 00:24:31 +02:00
Aliaksandr Valialkin
8005ba26b9
lib/netutil: enable IPv6 UDP listening if -enableTCP6
command-line flag is passed to VictoriaMetrics
...
This is a follow-up for 18cfc4be7b
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1131
2021-03-17 00:19:30 +02:00
Aliaksandr Valialkin
05e301cfa0
app/vmselect/netstorage: reduce mutex contention when unpacking data on a system with high number of CPU cores
2021-03-16 21:52:05 +02:00
Aliaksandr Valialkin
3caac5edd4
Makefile: prepare vmutils-windows-*.zip archive on make release-vmutils
command
...
The archive contains the following executables for Windows:
* vmagent
* vmalert
* vmauth
* vmctl
Other components - vmbackup, vmrestore, victoria-metrics - aren't supported for Windows yet
2021-03-16 20:54:10 +02:00
Aliaksandr Valialkin
f54ece438d
app/vmselect/promql: do not crash if histogram_over_time()
function name contains uppercase letters such as Histogram_over_time()
2021-03-16 12:23:55 +02:00
Aliaksandr Valialkin
d074326970
app/vmstorage: add -logNewSeries
command-line flag for determining the source of series churn rate
2021-03-15 22:40:28 +02:00
Aliaksandr Valialkin
e2717d84c0
all: various fixes in command-line flag descriptions
2021-03-15 22:03:49 +02:00
Aliaksandr Valialkin
776b8b32ca
app/{vminsert,vmagent}: a follow-up for b1aa8c3d8f
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1124
2021-03-15 22:03:49 +02:00
Nikolay
a843dc0219
adds fake response for telegraph queries ( #1130 )
...
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1124
2021-03-15 22:03:49 +02:00
Aliaksandr Valialkin
30ab0eec27
app/vmselect/promql: reduce overhead on scrape interval estimation
...
It should be enough to use the first 20 datapoints instead of 100 datapoints for scrape interval estimation.
2021-03-15 20:32:35 +02:00
Aliaksandr Valialkin
8844b38745
app/vmselect/promql: fix tests after 2dae0a2c47
2021-03-15 20:20:27 +02:00
Aliaksandr Valialkin
6b9bba7448
app/vmselect: add round_digits
query arg to /api/v1/query
and /api/v1/query_range
handlers for limiting the number of decimal digits after the point
2021-03-15 12:38:59 +02:00
Aliaksandr Valialkin
afa5b58c2d
app/vminsert/opentsdbhttp: typo fix in vm_rows_inserted_total{type="opentsdbhttp"}
metric: opentsdb-http -> opentsdbhttp
2021-03-12 15:59:31 +02:00
Aliaksandr Valialkin
b6dcb37fca
app/vmselect/prometheus: do not include datapoints with timestamps matching t-d
when returning results from /api/v1/query?query=m[d]&time=t
as Prometheus does
2021-03-12 12:18:37 +02:00
Aliaksandr Valialkin
60e0280a94
lib/promscrape: add ability to configure proxy options via proxy_tls_config
, proxy_basic_auth
, proxy_bearer_token
and proxy_bearer_token_file
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1116
2021-03-12 03:36:11 +02:00
Ihor Borodin
933de6b9b1
Fixing examples of external.alert.source in documentation ( #1120 )
...
* Fixing examples of external.alert.source in documentation
2021-03-10 12:08:22 +02:00
Aliaksandr Valialkin
942890b1bb
app/vmselect/promql: follow up for 433fff0006
2021-03-09 12:54:23 +02:00
Nikolay
28e450cd7c
duplicate timeseries fix for prometheus_buckets function ( #1119 )
...
* try fix for prometheus_buckets
* merge possible end of the bucket collision
2021-03-09 12:54:21 +02:00
Aliaksandr Valialkin
502fab797a
lib/promscrape: add scrape_offset
option to scrape_config
...
This option can be used for specifying the particular offset per each scrape interval for target scraping
2021-03-08 11:59:32 +02:00
Aliaksandr Valialkin
26cb6f8861
app/vmauth: allow using regexps in url_map
paths
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1112
2021-03-05 18:53:40 +02:00
Aliaksandr Valialkin
5277507932
app/vmselect/promql: add histogram_avg()
, histogram_stddev()
and histogram_stdvar()
functions to MetricsQL
2021-03-04 14:12:52 +02:00
Aliaksandr Valialkin
133fb9fc00
lib/promscrape: add -promscrape.cluster.replicationFactor
command-line flag for replicating scrape targets among vmagent
instances in the cluster
2021-03-04 10:21:27 +02:00
Aliaksandr Valialkin
d109e17f46
all: bump minimum supported Go version from 1.13 to 1.14
2021-03-03 15:58:17 +02:00
Aliaksandr Valialkin
3c11ce9356
docs/vmagent.md: remove outdated suggestion for determining labels that lead to duplicate targets
...
The original labels for duplicate targets is already printed in the error message starting from 71ea4935de
2021-03-03 12:28:50 +02:00
Roman Khavronenko
219291e084
Vmagent docs upd ( #1104 )
...
* vmagent: port changes from https://github.com/VictoriaMetrics/VictoriaMetrics.github.io/pull/1
Thanks to @dereksfoster99 for this patch!
* vmagent: reword to make the meaning clear
2021-03-03 10:53:41 +02:00
Aliaksandr Valialkin
2ecee0515a
app/vmalert/README.md: sync with docs/vmalert.md
2021-03-03 10:42:54 +02:00
Aliaksandr Valialkin
c67a07b469
lib/handshake: log read/write operation duration on connection errors
...
This improve debuggability of network errors
2021-03-02 21:20:20 +02:00
Aliaksandr Valialkin
d9e8af0e8f
docs: actualize -help
output
2021-03-01 17:02:05 +02:00
Aliaksandr Valialkin
323af49234
app/vmagent/remotewrite: clarify -remoteWrite.flushInterval
flag description
2021-03-01 11:51:08 +02:00
Aliaksandr Valialkin
b8dd5e8292
app/vmagent/remotewrite: fix rate limiting logic for -remoteWrite.url
2021-03-01 00:59:57 +02:00
Aliaksandr Valialkin
d0be1f6f49
app/vmagent: remove data race when applying rate limits to -remoteWrite.url
with multiple queues
2021-03-01 00:28:20 +02:00
Aliaksandr Valialkin
17eb29206d
docs/vmbackup.md: clarify docs on vmagent
clustering
2021-02-28 21:59:55 +02:00
Aliaksandr Valialkin
3b1c2f03c3
app/vmselect/querystats: show the number of matching queries in the top by average duration and in the top by summary duration
...
This should help debugging slow queries.
2021-02-28 19:42:29 +02:00
Aliaksandr Valialkin
9a2bf65134
lib/promscrape: add ability to spread scrape targets among multiple vmagent instances
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1084
2021-02-28 18:40:42 +02:00
Nikolay
b52d1e4f19
adds query params for vmalert ( #1094 )
...
remoteWrite.url now accepts query params at provided url
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1087
2021-02-28 14:12:34 +02:00
Aliaksandr Valialkin
3721c5353a
app/vmbackupmanager: add docs; the vmbackupmanager is available as a part of enterprise subscription
2021-02-27 02:18:33 +02:00
Aliaksandr Valialkin
7f1302688f
lib/fs: follow-up after f3a03c4164
2021-02-27 01:09:37 +02:00
Nikolay
d88fa5ebe4
Adds windows build ( #1040 )
...
* fixes windows compilation,
adds signal impl for windows,
adds free space usage for windows,
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/70
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1036
NOTE victoria metrics database still CANNOT work under windows system,
only vmagent is supported.
To completly port victoria metrics, you have to fix issues with separators,
parsing and posix file removall
* rollback separator
* Adds windows setInformation api,
it must behave like unix, need to test it.
changes procutil
* check for invlaid param
* Fixes posix delete semantic
* refactored a bit
* fixes openbsd build
* removed windows api call
* Fixes code after windows add
* Update lib/procutil/signal_windows.go
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2021-02-27 01:06:22 +02:00
Nikolay
673b10dd7f
adds enforced tag filters into cache key ( #1095 )
2021-02-27 00:23:38 +02:00
Aliaksandr Valialkin
e38ca28d99
app/vmselect/promql: increase accuracy for buckets_limit()
function for small limits by skipping the first and the last buckets during merge
...
The first and the last buckets are usually `[0 ... leMin]` and `(leMax ... +Inf)`. If they are merged with adjancent buckets,
then the resulting accuracy can suffer.
2021-02-26 22:56:04 +02:00
Aliaksandr Valialkin
0144b164c7
app/vmselect: add sign(q)
and clamp(q, min, max)
functions, which will be added in the upcoming Prometheus release
...
See https://twitter.com/roidelapluie/status/1363428376162295811
The `last_over_time(m[d])` function already exists in MetricsQL.
2021-02-24 17:26:27 +02:00
Aliaksandr Valialkin
1b90a091cf
app/vmselect/netstorage: cleanup after 4805b80977
2021-02-24 11:43:09 +02:00
weng zhao
4805b80977
vmselect: fix vmselect cache partial result when timeout ( #1085 )
2021-02-24 11:39:56 +02:00
Aliaksandr Valialkin
d16effc29e
app/vmselect/promql: properly calculate histogram_quantile() over zero buckets and only a single non-zero
le="+Inf"` bucket like Prometheus does
2021-02-24 00:41:30 +02:00
Aliaksandr Valialkin
5dbe88a1c6
app/vmselect/promql: add increase_pure()
function to MetricsQL
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962
2021-02-22 19:15:31 +02:00
Aliaksandr Valialkin
197ecca426
lib/promrelabel: add more optimizations for relabeling for common cases
2021-02-22 16:36:54 +02:00
Aliaksandr Valialkin
72eef964d9
app/vmagent: properly perform graceful shutdown, which was broken in the commit 1d1ba889fe
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1065
2021-02-19 00:34:17 +02:00
Aliaksandr Valialkin
41d3ff4f2b
app/vmagent: fix scrape config example for scrape_align_interval option
2021-02-18 23:57:45 +02:00
Aliaksandr Valialkin
502d0e2524
lib/promscrape: add scrape_align_interval config option into scrape config
...
This option allows aligning scrapes to a particular intervals.
2021-02-18 23:53:04 +02:00
Aliaksandr Valialkin
bd1d906eee
app/vmselect/promql: reduce the probability of duplicate time series
errors when querying Kubernetes metrics
2021-02-18 22:08:13 +02:00
Aliaksandr Valialkin
902a4f6486
app/victoria-metrics: remove accidentally added single-node tests
2021-02-18 18:33:03 +02:00
Aliaksandr Valialkin
901710b9e2
app/vmalert: add missing multiarch Dockerfile
2021-02-18 15:23:57 +02:00
Aliaksandr Valialkin
1dad7ecf54
app/victoria-metrics/testdata: add a test for {__graphite__="foo.*.bar"} selector
2021-02-17 21:53:24 +02:00
Aliaksandr Valialkin
9c81429299
app/vmagent/remotewrite: cleanup after 1d1ba889fe
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1065
2021-02-17 21:43:48 +02:00
Nikolay
40973eda1c
adds pushback for fastqueue, ( #1075 )
...
during shutdown currently sending block was lost,
now its pushed back to fast queue and will be flushed on disk,
it may lead to data duplication.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1065
2021-02-17 21:43:46 +02:00
Aliaksandr Valialkin
83da939947
app/vmstorage: export vm_composite_filter_success_conversions_total and vm_composite_filter_missing_conversions_total metrics
2021-02-17 19:13:49 +02:00
Aliaksandr Valialkin
3062ff0fdb
app/vmselect: export per-tenant stats on the number of requests and the cumulative request duration
...
The metrics are:
- vm_vmselect_http_requests_total{accountID="...",projectID="..."} - the total number of select requests per each tenant
- vm_vmselect_http_duration_ms_total{accountID="...",projectID="..."} - the total duration in milliseconds for per-tenant select requests
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/932
2021-02-16 23:30:29 +02:00
Aliaksandr Valialkin
667a7594b7
docs: rename vmbackuper to vmbackupmanager
2021-02-16 22:01:21 +02:00
Aliaksandr Valialkin
73c9da16b8
app/vmselect/netstorage: reuse timeseriesWork objects in order to reduce memory allocations
2021-02-16 16:09:00 +02:00
Aliaksandr Valialkin
a3a09a3c6e
app/vmselect/netstorage: use unsafe string as a key for a map when the map already contains the given key
...
This should prevent from a memory allocation and a string copy.
2021-02-16 15:46:31 +02:00
Aliaksandr Valialkin
46e98ed490
vendor: update github.com/VictoriaMetrics/metrics from v1.13.1 to v1.14.0
...
The new version switches from log-linear histograms to log-based histograms,
which provide up to 3.6 times better accuracy.
2021-02-15 15:11:15 +02:00
Aliaksandr Valialkin
c769f8321d
deployment/docker: embed tzdata into prod Go app instead of installing it into base docker image
...
While this increases app size by 700Kb, this allows using -loggerTimezone in a scratch base image
See https://github.com/golang/go/issues/38017
2021-02-12 04:56:27 +02:00
Aliaksandr Valialkin
ff7850aec0
deployment/docker: use docker buildx
for creating multiarch builds
...
See https://github.com/docker/buildx/
2021-02-12 04:35:35 +02:00
Aliaksandr Valialkin
ee4288987b
app/vmselect/prometheus: treat match
query arg in the same way as match[]
query arg
2021-02-11 15:01:55 +02:00
Aliaksandr Valialkin
9e88ff3075
app/vmauth: add ability to route requests from a single users to multiple targets depending on the requested path
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1064
2021-02-11 12:41:38 +02:00
Aliaksandr Valialkin
54d2f67924
app/vmselect/promql: properly make copies of EvalConfig
2021-02-11 12:41:37 +02:00
Aliaksandr Valialkin
5973fd4067
app/vmselect/promql: make a copy of EvalConfig when executing q1
and q2
in parallel for q1 binary_op q2
...
This should prevent from data races if the underlying functions modify EvalConfig contents.
2021-02-10 23:06:58 +02:00
Aliaksandr Valialkin
985c3e301d
app/vmselect: parallelize q1 <binary_op> q2
queries by running q1
and q2
in parallel
...
This should reduce query execution times.
2021-02-10 23:00:56 +02:00
Aliaksandr Valialkin
08f21d8761
app/vmstorage: export vm_composite_index_min_timestamp metric
2021-02-10 17:14:00 +02:00
Aliaksandr Valialkin
148422bcba
lib/storage: disable composite index usage when querying old data
2021-02-10 14:57:58 +02:00
Aliaksandr Valialkin
fa0ef143b1
lib/storage: optimize search by label filters matching big number of time series
2021-02-10 00:46:17 +02:00
Aliaksandr Valialkin
e8ee9fa7fe
app/vmstorage: export missing vm_cache_size_bytes
metrics for indexdb and data caches
2021-02-09 00:49:58 +02:00
Aliaksandr Valialkin
35eb04b7dd
docs/vmctl.md: fix title, so it is properly displayed in the header of https://victoriametrics.github.io/
2021-02-04 20:20:38 +02:00
Roman Khavronenko
2aa37b0450
vmalert: mention -datasource.appendTypePrefix
in README ( #1052 )
2021-02-03 23:48:45 +02:00
Dmitry Shevchuk
007fd6ce9c
Adds ability to query right vmselect endpoint based on the query type ( #1050 )
...
* Adds ability to query right vmselect endpoint based on the query type
Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>
2021-02-03 23:48:44 +02:00
Aliaksandr Valialkin
88ee836d0c
docs/vmalert.md: mention that type
option can be set at group level additionally to rule level
2021-02-03 21:12:39 +02:00
Aliaksandr Valialkin
a3aa9bdc9f
app/vmagent: add Advanced usage
section with the description for all the command-line flags
2021-02-03 21:03:52 +02:00
Aliaksandr Valialkin
8de3a329ff
app/vmselect: deprecate -search.treatDotsAsIsInRegexps
in favor to {__graphite__="foo.*.bar"}
syntax
2021-02-03 20:36:42 +02:00
Aliaksandr Valialkin
8249f13104
app/vmselect,lib/storage: properly parse Graphite selectors with inner wildcards
...
Example: foo{bar{x,yz},a[b-c],*de}
2021-02-03 20:16:28 +02:00
Aliaksandr Valialkin
4b930b9ffe
app/vmselect: add ability to set Graphite-compatible filter via {__graphite__="foo.*.bar"}
syntax
2021-02-03 01:17:19 +02:00
Aliaksandr Valialkin
03da0b728c
docs: increase heading sizes in vmagent, vmauth, vmbackup and vmrestore docs, so they match the heading sizes in VictoriaMetrics docs
2021-02-01 19:44:58 +02:00
Aliaksandr Valialkin
f4a4665857
docs/vmctl.md: update build instructions after the migration from github.com/VictoriaMetrics/vmctl to github.com/VictoriaMetrics/VictoriaMetrics/app/vmctl
2021-02-01 19:44:57 +02:00
Aliaksandr Valialkin
7d23f3ff3a
app/vmselect: add ability to set an additional label filters via extra_label
query arg
2021-02-01 17:42:35 +02:00
Aliaksandr Valialkin
6811445b64
docs: document ability to query Graphite datasource from vmalert
2021-02-01 15:28:31 +02:00
Nikolay
b8bc1c2e0f
Graphite vmalert wip ( #112 )
...
* init implementation for graphite alerts
* adds graphite support for vmalert
* small fix
* changes vmalert graphite api with type
* updates tests
* small fix
* fixes graphite parse
* Fixes graphite from time
2021-02-01 15:28:30 +02:00
Aliaksandr Valialkin
fdf9de98f8
app/vmagent: add -remoteWrite.roundDigits command-line option for limiting the number of digits after the point for stored values
...
This commit also adds --vm-round-digits command-line option to vmctl tool.
2021-02-01 14:42:15 +02:00
Aliaksandr Valialkin
05474aaa29
app/vmctl: fix make check-all
warnings
2021-02-01 01:31:45 +02:00
Aliaksandr Valialkin
7f4fb34182
app/vmctl: move vmctl code from github.com/VictoriaMetrics/vmctl
...
It is better developing vmctl tool in VictoriaMetrics repository, so it could be released
together with the rest of vmutils tools such as vmalert, vmagent, vmbackup, vmrestore and vmauth.
2021-02-01 01:18:39 +02:00
Aliaksandr Valialkin
5328a102e0
app/vmselect: unconditionally deny partial responses from /api/v1/export*
...
It is expected that `/api/v1/export*` returns full data, so there is no sense in partial responses there.
2021-01-27 14:39:53 +02:00
Aliaksandr Valialkin
4b324da947
all: consistently use timers from timerpool
2021-01-27 00:40:39 +02:00
Aliaksandr Valialkin
29bf531f7d
app/vmagent: add -remoteWrite.rateLimit command-line flag for limiting data rate to remote storage
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1035
2021-01-27 00:40:39 +02:00
weng zhao
2a8a34ea05
vmalert: add option datasource.queryStep to allow user to address the inconsistency between grafana dashboards(query_range with step 15s usually) and ALERTS ( #1027 )
...
Co-authored-by: zhao.weng <zhao.weng@shopee.com>
2021-01-26 16:38:20 +02:00
Aliaksandr Valialkin
44c74f1e79
app/vmselect/promql: improve documentation for -search.maxPointsPertimeseries
command-line flag
...
This should reduce incorrect usage and assumptions for this flag.
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1020
2021-01-22 13:00:35 +02:00
Aliaksandr Valialkin
e55205220b
app/vmselect: add -search.maxStepForPointsAdjustment
command-line flag, which can be used for disabling adjustment for points returned from /api/v1/query_range
handler if they have timestamps closer than -search.latencyOffset
to the current time
2021-01-19 22:57:50 +02:00
Aliaksandr Valialkin
5856611291
app/vmselect/graphite: extract getCanonicalPath() function from loop body inside getCanonicalPaths()
2021-01-18 17:31:27 +02:00
Aliaksandr Valialkin
5640e6cbca
docs/vmagent.md: follow-up for 184a659c5f
2021-01-13 13:54:28 +02:00
Aliaksandr Valialkin
c5bdab5a4c
app/vmselect/promql: add ability to pass multiple labels to sort_by_label
and sort_by_label_desc
functions
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/992
2021-01-13 12:43:47 +02:00
Aliaksandr Valialkin
8cae98aa78
app/vmselect/promql: properly parse escaped multibyte utf8 code sequences in metric names and labels names
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/990
2021-01-13 10:59:32 +02:00
Nikolay
821492bc0b
adds extra_label to all import apis ( #1007 )
...
* adds extra_label to all import apis,
changes priority for extra_label - now it has priority over original labels
* Update README.md
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
* Update README.md
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
* adds extra labels to vmagent import api
changes order for adding labels, now its added after user values
* adds tests for extra_label
* import fix
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2021-01-13 01:07:24 +02:00
Aliaksandr Valialkin
df6e399f73
app/vmselect/promql: add tfirst_over_time(m[d])
and tlast_over_time(m[d])
MetricsQL functions for returning timestamps for the first and the last samples in m
over d
2021-01-12 16:12:47 +02:00
Nikolay
9f0a4fd00e
Fixes error handling for promscrape.streamParse ( #1009 )
...
properly return error if client cannot read data,
properly suppress scraper errors
2021-01-12 13:35:09 +02:00
Roman Khavronenko
304512b668
vmalert-989: return non-empty result in template func query
stub to pass validation ( #1002 )
...
On templates validation stage vmalert does not acutally send queries, so for complex
chained expression validation may fail. To avoid this, we add a blank sample in response
so validation can pass successfully. Later, during the rule execution, stub will be replaced
with real `query` function.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/989
2021-01-11 12:59:33 +02:00
Aliaksandr Valialkin
4ee53c3961
all: use net.Dial
instead of fasthttp.Dial
, because fasthttp.Dial
limits the number of concurrent dials to 1000
2021-01-11 12:52:51 +02:00
Aliaksandr Valialkin
d5a2b120e9
app/vmstorage: disable final merge by default, since it may result in high disk IO and CPU usage without measurable benefits such as increased query performance and reduced disk space usage
2021-01-08 00:12:12 +02:00
Aliaksandr Valialkin
47872ada7e
app/vmselect/promql: do not ajdust offset
value provided in the query
...
Previously it could be modified in order to improve response cache hit ratio.
This is unneeded, since cache hit ratio should remain good because the query time range
should be already aligned to multiple of `step` values.
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/976
2020-12-27 14:10:15 +02:00
Aliaksandr Valialkin
5bbf200de2
app/vmselect: add per-tenant /api/v1/status/top_queries
handler
2020-12-27 12:53:50 +02:00
Aliaksandr Valialkin
0e739efc88
app/vmselect/promql: simplify defer call for querystats.RegisterQuery
2020-12-27 12:07:56 +02:00
Aliaksandr Valialkin
44932098b5
app/vmselect/querystats: reduce the default number of last queries to track from 100K to 20K
...
This should reduce memory usage in constrained environments
2020-12-25 17:40:32 +02:00
Aliaksandr Valialkin
e6deb39064
app/vmselect: refactor /api/v1/stats/top_queries
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/907
2020-12-25 17:24:25 +02:00
Nikolay
76d092c091
Adds query stats handler ( #945 )
...
* Adds query stat handler,
for query and query_range api, victoriametrics tracks query execution time,
stats are expored at /api/v1/status/queries endpoint with topN param
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/907
* fixed query stats bugs
* improves queryStats tracker
* improves query stat
* small fix
* fix tests
* added more tests
* fixes 386 tests
* naming fixes
* adds drop for outdated records
2020-12-25 17:24:24 +02:00
Nikolay
14915071d6
adds escape for CRLF ( #984 )
...
at external.alert.source - \n and \r symbols was url encoded, instead of direct usage.
replace it from "\n" to `\n` allows to skip url encoding.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/890
2020-12-25 11:06:47 +02:00
Aliaksandr Valialkin
b480585905
app/vmalert: typo fix in descriptions for notifier.basicAuth.username and notifier.basicAuth.password command-line flags
2020-12-24 12:49:40 +02:00
Nikolay
0b87f02602
fixes panic ( #979 )
...
* fixes panic
https://github.com/VictoriaMetrics/helm-charts/issues/89
* add fast-path
* Apply suggestions from code review
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2020-12-24 09:01:40 +02:00
Aliaksandr Valialkin
d8511b6651
docs: mention that it is possible to set multiple -notifier.tlsInsecureSkipVerify
command-line flags for vmalert
...
See c3a92968343c2b3619f1ab935702d0e9b3a46733
2020-12-22 22:32:56 +02:00
Nikolay
67e470e598
changes vmalert notifier flag, ( #978 )
...
fixes issue with notifier insecure setting, now its possible to use multiple notifier.tlsInsecureSkipVerify multiple time.
2020-12-22 22:27:03 +02:00
Roman Khavronenko
9ce8b36d2a
vmalert-974: fix order for labels templating ( #975 )
...
The change fixes bug caused by 3adf8c5a6f
.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/974
2020-12-19 14:21:27 +02:00
Aliaksandr Valialkin
262cf81757
app/vmselect: properly parse negative combined offsets such as -1h2m3s
...
Previously such offsets were parsed as `-1h + 2m + 3s`. Now they are parsed as `-(1h + 2m + 3s)`.
2020-12-19 01:25:03 +02:00
Aliaksandr Valialkin
49e800ba55
app/vmagent: add vmagent_remotewrite_blocks_sent_total
and vmagent_remotewrite_bytes_sent_total
metrics per each -remoteWrite.url
2020-12-15 20:41:08 +02:00
Aliaksandr Valialkin
9ab7ca1133
docs/vmagent.md: typo fix: pearsed->parsed
2020-12-15 19:03:35 +02:00
Aliaksandr Valialkin
11674a9b76
docs/vmagent.md: mention that sample_limit
option has no sense when stream parsing is enabled
2020-12-15 18:44:19 +02:00
Aliaksandr Valialkin
8d1031c29a
app/vmselect/promql: return expected increase()
result for the first point on the graph with value not exceeding 100
2020-12-15 14:10:50 +02:00
Nikolay
7064c4eb8e
adds new Array Flags ( #965 )
...
* adds ArrayDuration and ArrayBool flags,
makes sendTimeout and tlsInsecure configurable per remoteWrite url
* added backward compatibility testcases for ArrayDuration and ArrayBool
* fixes bool flag
* fixes test cases
2020-12-15 12:59:33 +02:00
Roman Khavronenko
9f578e389c
vmalert: add function "query", "first" and "value" to alert templates functions ( #960 )
...
The commit adds a support for template function `query`,
`first` and `value`. The function `query` executes
a MetricsQL query for active alerts. In vmalert we
update templates on every evaluation for active alerts
to keep them up to date. With `query` func it may become
a perf issue since it will fire a query on every execution.
We should keep it in mind for now.
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/539
2020-12-14 20:12:16 +02:00
Aliaksandr Valialkin
a2eb451de4
app/{vmagent,vminsert}: follow-up for ce8c2dd1f1
: return /targets
page in HTML when requested via web browser
2020-12-14 14:13:01 +02:00
Nikolay
324e3aa1a5
Changes targets api ( #961 )
...
* changes /targets api
adds html response if requester accepts text/html,
adds quick template for /targets api,
fixes pathPrefix for / requests
* changes namings
* renamed targets file
* Update app/victoria-metrics/main.go
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
* adds trimspace to qtpl,
moves content-type for targets response closer to writer
* fixes bug with prefix
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2020-12-14 14:13:00 +02:00
Aliaksandr Valialkin
fc82c22e50
docs: consistently use links to https://victoriametrics.github.io for documentation references
2020-12-11 21:09:17 +02:00
Aliaksandr Valialkin
d6f9bf2d19
app/vmselect/graphite: properly handle wildcards and charsets inside curly braces
...
For example, `foo{bar*,[a-f]a*b}` should match `foobar`, `foobar123`, `foofab`, etc.
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/952
2020-12-11 17:26:32 +02:00
Aliaksandr Valialkin
9e79fc27c8
app/vminsert/netstorage: properly update vm_rpc_rerouted_rows_processed_total
metric
...
Previously this metric wasn't updated because of improper defer call.
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/955
Thanks to @xemxx for spotting the bug.
2020-12-11 13:07:05 +02:00
Aliaksandr Valialkin
1a237c6903
all: properly handle CPU limits set on the host system/container
...
This can reduce memory usage on systems with enabled CPU limits.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/946
2020-12-08 21:07:03 +02:00
Aliaksandr Valialkin
bd8eef2528
app/vmselect/promql: do not reduce lookbehind window for any_rollup_func(m)
to -search.maxStalenessInterval
. It should equal to step
value passed to /api/v1/query_range
as most users expect
2020-12-08 15:17:05 +02:00
Aliaksandr Valialkin
7bdf07883b
app/{vmalert,vmagent}: skip empty values in -remoteWrite.label
and -label
lists
2020-12-08 14:54:02 +02:00
Aliaksandr Valialkin
9660774fd1
app/vmselect/graphite: remove duplicate name
tag from /tags/autoComplete/tags
handler
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/942
2020-12-07 01:10:02 +02:00
Aliaksandr Valialkin
d242c2f2bd
app/vmselect/promql: add count_eq_over_time(m[d], N)
and count_ne_over_time(m[d], N)
for calculating the number of samples in m
over d
that are equal / not equal to N
2020-12-05 12:31:01 +02:00
Aliaksandr Valialkin
bdac2171f1
all: do not print usage info for all the flags when incorrect command-line flag is passed
...
This should improve usability for VictoriaMetrics apps that have big number of command-line flags,
i.e. all the apps.
2020-12-03 21:46:19 +02:00
Aliaksandr Valialkin
8cf76d8747
app/vmselect/promql: add label_uppercase(q, label1, ... labelN)
and label_lowercase(q, label1, ... labelN)
functions
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/936
2020-12-03 21:46:18 +02:00
Aliaksandr Valialkin
11bbb3552d
app/vmselect/promql: make fmt
2020-12-02 21:34:15 +02:00
Aliaksandr Valialkin
9e98a8f3d3
app/vmselect/promql: return nan
from minute(m)
when m
equals to nan
...
This aligns VictoriaMetrics behaviour with Prometheus behaviour.
The issue has been spotted in https://promlabs.com/promql-compliance-test-results/2020-12-01/victoriametrics/
2020-12-02 20:16:40 +02:00
Aliaksandr Valialkin
def513355e
app/vmselect/promql: do not return 0
value from sum_over_time(m[d])
when there are no samples on the given d
window.
...
This aligns the behaviour of `sum_over_time()` with other `_over_time()` functions and with Prometheus behavior.
2020-12-02 13:12:33 +02:00
Aliaksandr Valialkin
490c70a958
app/vmselect: return metric
values from time() cmp_op metric
query when cmp_op
comparison is true
...
This aligns MetricsQL behavior to Prometheus' one.
The issue has been identified at https://promlabs.com/promql-compliance-test-results/2020-12-01/victoriametrics/
2020-12-02 12:09:40 +02:00
Aliaksandr Valialkin
4ef7158e89
app/vmselect/promql: return nan
from a >bool b
if a
is nan
in the same way as Prometheus does
2020-12-02 00:28:56 +02:00
Aliaksandr Valialkin
adf45b730c
app/vmselect/searchutils: return elapsed time in Deadline.String() output
...
This should improve debuggability for error messages containing Deadline.String() output
2020-12-01 00:14:36 +02:00
Aliaksandr Valialkin
1dce37b2fa
app/vmbackup/snapshot: add missing status code check for the returned response when working with snapshot API
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/929
2020-11-30 14:49:29 +02:00
Aliaksandr Valialkin
8b5a38376d
app/vmbackup/snapshot: log url and response body on failed JSON response parsing
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/929
2020-11-29 12:16:08 +02:00
Nikolay
e4e33cb757
fixes checksum calculation ( #928 )
...
* fixes checksum calculation,
'for' rule param wasnt marshal properly during checksum calculation
* fixes error
2020-11-29 09:50:57 +02:00
Aliaksandr Valialkin
3f52e59efe
app/{vmagent,victoria-metrics}: add -dryRun
option and make more clear handling for -promscrape.config.dryRun
2020-11-25 23:01:39 +02:00
Aliaksandr Valialkin
ed06990609
app/vmagent: do not enable -promscrape.config.strictParse when -dryRun command-line flag is set
...
Users can specify -promscrape.config.strictParse if -promscrape.config shouldn't contain unknown config entries
2020-11-25 22:27:41 +02:00
BigFish
3159b41689
Update main.go ( #922 )
...
fix spelling mistake
2020-11-24 12:36:47 +02:00
Aliaksandr Valialkin
2cc288c023
app/vmbackup: cosmetic fixes
2020-11-23 17:10:13 +02:00