Roman Khavronenko
8c8ff5d0cb
vmalert: cleanup and restructure of code to improve maintainability ( #471 )
...
The change introduces new entity `manager` which replaces
`watchdog`, decouples requestHandler and groups. Manager
supposed to control life cycle of groups, rules and
config reloads.
Groups export an ID method which returns a hash
from filename and group name. ID supposed to be unique
identifier across all loaded groups.
Some tests were added to improve coverage.
Bug with wrong annotation value if $value is used in
templates after metrics being restored fixed.
Notifier interface was extended to accept context.
New set of metrics was introduced for config reload.
2020-05-10 17:58:17 +01:00
Nikolay Khramchikhin
9e8733ff65
vmalert config reload
...
added config hot reload for vmalert with sighup and api call
2020-05-09 10:32:12 +01:00
Aliaksandr Valialkin
baedb25936
docs/vmauth.md: fix a link to docker images
2020-05-08 14:10:04 +03:00
Aliaksandr Valialkin
51291015a5
app/vmagent: return 200 from /-/reload
endpoint as Prometheus does
2020-05-07 19:30:30 +03:00
Aliaksandr Valialkin
6afb25fd08
docs/{vmagent,vmauth}: small clarifications in the docs
2020-05-07 12:55:20 +03:00
Aliaksandr Valialkin
653d51694a
app/vmauth: prevent from attacks with ..
in path for accessing resources outside the configured url_prefix
2020-05-07 12:55:18 +03:00
Aliaksandr Valialkin
8a00807f60
app/vmagent: allow setting independent auth configs per each configured -remoteWrite.url
2020-05-06 16:51:41 +03:00
Aliaksandr Valialkin
b69eb7bf38
app/vmagent: properly set client-side TLS certificates for -remoteWrite.url
. Previously they were mistakenly set as server-side
2020-05-06 16:50:30 +03:00
Aliaksandr Valialkin
e8936c9cb3
docs/vmagent.md: small fixes
2020-05-06 14:49:18 +03:00
Aliaksandr Valialkin
3f52a97f9b
lib/promscrape: add Prometheus-compatible DNS-based service discovery aka dns_sd_configs
2020-05-06 00:01:58 +03:00
Aliaksandr Valialkin
08320cfcf4
docs/{vmauth,vmagent}: fix ports for profiling
2020-05-05 20:15:47 +03:00
Aliaksandr Valialkin
f65930b34d
docs/vmauth.md: mention that we can help creating customized proxy
2020-05-05 12:34:42 +03:00
Aliaksandr Valialkin
266327642b
docs/{vmagent,vmauth}: add Profiling
section
2020-05-05 11:45:13 +03:00
Aliaksandr Valialkin
0c7cddfca6
docs: add vmauth.md
2020-05-05 11:17:23 +03:00
Aliaksandr Valialkin
e767aedd17
app/vmauth: add initial version of vmauth. See https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmauth/README.md for details
2020-05-05 10:54:17 +03:00
Aliaksandr Valialkin
b5a780930d
docs/vmagent.md: /targets
page doesnt expose infomration about imporperly configured scrape configs now. It is written in error log instead
2020-05-05 10:54:14 +03:00
Roman Khavronenko
0ba1b5c71b
app/vmalert: restore alerts state from datasource metrics ( #461 )
...
* app/vmalert: restore alerts state from datasource metrics
Vmalert will restore alerts state for rules that have `rule.For` > 0 from previously written timeseries via `remotewrite.url` flag.
* app/vmalert: mention remotewerite and remoteread configuration in README
2020-05-05 00:51:22 +03:00
Aliaksandr Valialkin
40c3ffb359
lib/promscrape: add Prometheus-compatible service discovery for Consul aka consul_sd_configs
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/330
2020-05-04 20:51:17 +03:00
Aliaksandr Valialkin
432187ac3b
app/vminsert: add /-/reload
handler in the same way as for vmagent
2020-04-30 02:15:39 +03:00
DexterZhang
67511d4165
feat(vmagent): add promscrap config reload suppport via http ( #450 )
...
* feat(vmagent): add promscrap config reload suppport via http endpoint `/-/reload`
* fix: typo fix
2020-04-30 02:00:32 +03:00
Aliaksandr Valialkin
43c39dc36c
vendor: use github.com/VictoriaMetrics/fasthttp instead of github.com/fasthttp/fasthttp
...
The upstream fasthttp may contain issues like 996610f021
,
plus a code that isn't used by VictoriaMetrics. So let's use a private copy under our control instead.
2020-04-29 17:33:34 +03:00
Artem Navoiev
4487b454a8
Update README.md
2020-04-29 12:39:15 +03:00
Aliaksandr Valialkin
57407cca83
app/vmselect/promql: remove -search.maxPointsPerTimeseries
command-line flag
...
Limit the estimated time series count after aggregation with grouping by the number of source time series.
2020-04-29 00:20:04 +03:00
Aliaksandr Valialkin
4e4f57b121
lib/metricsql: move it to a separate repository - github.com/VictoriaMetrics/metrics
2020-04-28 15:28:22 +03:00
Aliaksandr Valialkin
17d96e4503
app/vmselect: add -search.estimatedSeriesCountAfterAggregation
command-line flag for tuning the probability of OOMs vs false-positive not enough memory
errors
2020-04-28 12:52:37 +03:00
Aliaksandr Valialkin
1397612117
app/vmalert: added missing comments for public entities
2020-04-28 11:21:07 +03:00
Roman Khavronenko
3bfa41a95c
app/vmalert: initial remote-write support for alerts state persistence. ( #442 )
...
* app/vmalert: initial remote-write support for alerts state persistence.
If `remotewrite.url` flag is set, vmalert will send alerts state via remote-write protocol to remote storage. The sending is asynchronous to avoid blocking calls in rules evaluation loop.
* app/vmalert: merge with master
* app/vmalert: write both `instant` and `for` alerts timeseries states in remote storage.
2020-04-28 00:18:02 +03:00
Aliaksandr Valialkin
90670cb55e
app/vmalert: include it into the next release
2020-04-28 00:10:12 +03:00
Aliaksandr Valialkin
b768bc9a6a
lib/promscrape: add initial support for Prometheus-compatible service discovery for Amazon EC2 aka ec2_sd_configs
2020-04-27 19:25:53 +03:00
Aliaksandr Valialkin
b4afe562c1
lib/storage: postpone reading data from blocks during search
...
This eliminates the need for storing block data into temporary files on a single-node VictoriaMetrics
during heavy queries, which touch big number of time series over long time ranges.
This improves single-node VM performance on heavy queries by up to 2x.
2020-04-27 11:45:24 +03:00
Aliaksandr Valialkin
0224071ebe
lib/promscrape/discovery/gce: allow empty project and zone for gce_sd_config
2020-04-27 11:45:02 +03:00
Aliaksandr Valialkin
fcf57f9883
app/vmselect/netstorage: substitute sorting packedTimeseries with the natural order of the fetched blocks
...
This should minimize the number of disk seeks when reading data from temporary file.
2020-04-26 16:26:23 +03:00
Aliaksandr Valialkin
6954d0edb7
lib/promscrape/discovery/gce: allow empty zone
arg in gce_sd_config
- in this case zones for the given project are automatically discovered
2020-04-26 14:34:11 +03:00
kreedom
2c18548e08
alert - rename validate function and flags ( #440 )
...
* alert - rename validate function and flags
2020-04-26 14:15:04 +03:00
kreedom
5f61d43db9
vmalert - validate template in labels ( #439 )
2020-04-26 13:53:57 +03:00
肖贝贝
eeadfccdc5
fix: fix vmalert template label not complete bug ( #435 )
...
Co-authored-by: xiaobeibei <xiaobeibei@bigo.sg>
2020-04-26 13:30:10 +03:00
Aliaksandr Valialkin
1f3fd93b58
docs/{vmbackup,vmrestore}.md: update -help
output
2020-04-24 22:44:21 +03:00
Jason Gardner
66af7e40f3
app/vmbackup: added ability to create and delete snapshots during backup ( #428 )
...
* app/vmbackup: added ability to create and delete snapshots during backup
Resolves: https://github.com/VictoriaMetrics/VictoriaMetrics/issues/422
* Add snapshot create and delete url flags
* Fixed errcheck warnings in build
2020-04-24 22:35:03 +03:00
Aliaksandr Valialkin
a596aec82c
app/vmselect: fix description for -search.resetCacheAuthKey
2020-04-24 19:45:50 +03:00
Aliaksandr Valialkin
9ef5935552
lib/promscrape: initial implementation for gce_sd_configs
aga Prometheus-compatible service discovery for Google Compute Engine
2020-04-24 17:51:22 +03:00
Aliaksandr Valialkin
364db13c9c
app/vmselect: add /api/v1/status/tsdb
page with useful stats for locating root cause for high cardinality issues
...
See https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-stats
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/425
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/268
2020-04-22 22:03:43 +03:00
Aliaksandr Valialkin
9ebc937685
app/vmselect: add -search.minStalenessInterval
command-line flag for removing gaps on graphs built from time series with irregular duration between samples
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/426
2020-04-20 19:42:15 +03:00
Aliaksandr Valialkin
fe57d46687
app/vmselect: merge -search.maxLookback
and -search.maxStalenessInterval
flags, since it has been appeared they have identical purpose :(
...
Leave both flags for backwards compatibility reasons.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/209
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/426
2020-04-20 19:26:31 +03:00
Aliaksandr Valialkin
851946af1e
deployment/docker: allow building docker images on top of any base image set via ROOT_IMAGE environment var
...
For example, the following command will build VictoriaMetrics docker image on top of alpine image:
ROOT_IMAGE=alpine make package-victoria-metrics
2020-04-20 01:16:57 +03:00
Aliaksandr Valialkin
936fb0eac3
app/vmagent/remotewrite: retry sending data if the server closes keep-alive connection
...
This should fix the following error when sending data to remote storage:
couldn't send a block with size XX bytes to "YYY": the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection
2020-04-17 15:52:42 +03:00
Aliaksandr Valialkin
79fb595732
docs/vmagent.md: typo fix: unvailable -> unavailable
2020-04-17 13:11:31 +03:00
Aliaksandr Valialkin
546d26523c
app/vmagent/README.md: mention about prodmscrape.suppressScrapeErrors
2020-04-17 13:08:21 +03:00
Aliaksandr Valialkin
f41e6a7bd9
app/vmselect: properly apply -search.maxLookback
to queries sent to /api/v1/query
2020-04-17 12:30:11 +03:00
Aliaksandr Valialkin
071fdf5518
lib/logger: add WARN level for logging expected errors such as invalid user queries
2020-04-15 20:50:26 +03:00
Aliaksandr Valialkin
6f7f64f757
app/vmselect: handle timestamp(metric offset X)
the same way as Prometheus does
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/415
2020-04-15 12:01:00 +03:00