Aliaksandr Valialkin
11fa458e39
app/vmselect/promql: return expected increase()
result for the first point on the graph with value not exceeding 100
2020-12-15 13:40:46 +02:00
Nikolay
95c9b630cc
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:51:12 +02:00
Roman Khavronenko
6247884057
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:11:45 +02:00
Aliaksandr Valialkin
f8e7f433cf
app/victoria-metrics: prettify /
page output
2020-12-14 14:07:58 +02:00
Aliaksandr Valialkin
069c9ade52
app/{vmagent,vminsert}: follow-up for ce8c2dd1f1
: return /targets
page in HTML when requested via web browser
2020-12-14 14:06:00 +02:00
Nikolay
ce8c2dd1f1
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 13:36:48 +02:00
Aliaksandr Valialkin
5ebfc275e6
app/victoria-metrics: automatically reset response cache when samples with too timestamps older than now - search.cacheTimestampOffset
are ingested
2020-12-14 13:08:28 +02:00
Aliaksandr Valialkin
9d42546a27
docs: consistently use links to https://victoriametrics.github.io for documentation references
2020-12-11 21:08:18 +02:00
Aliaksandr Valialkin
ba8ac08739
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:24:12 +02:00
Aliaksandr Valialkin
4146fc4668
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:29 +02:00
Aliaksandr Valialkin
1906f841c9
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:16:17 +02:00
Aliaksandr Valialkin
b6b1b06d70
app/{vmalert,vmagent}: skip empty values in -remoteWrite.label
and -label
lists
2020-12-08 14:55:13 +02:00
Aliaksandr Valialkin
007dbf273d
app/vmselect/graphite: remove duplicate name
tag from /tags/autoComplete/tags
handler
...
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/942
2020-12-07 01:08:52 +02:00
Aliaksandr Valialkin
e2e8ef86d9
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:30:46 +02:00
Aliaksandr Valialkin
9d787f9edd
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:47:37 +02:00
Aliaksandr Valialkin
66379cc69f
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:47:36 +02:00
Aliaksandr Valialkin
44a34a0f5f
app/vmselect/promql: make fmt
2020-12-02 21:33:35 +02:00
Aliaksandr Valialkin
1982505c2b
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:58 +02:00
Aliaksandr Valialkin
9d87496b50
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:50 +02:00
Aliaksandr Valialkin
91a4c279cc
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:34 +02:00
Aliaksandr Valialkin
700bda8e2e
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:26 +02:00
Aliaksandr Valialkin
efdc3c71af
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:15:18 +02:00
Aliaksandr Valialkin
ca091bade3
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:39 +02:00
Aliaksandr Valialkin
b35b3dc043
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:16 +02:00
Nikolay
0463cb5550
fixes checksum calculation ( #928 )
...
* fixes checksum calculation,
'for' rule param wasnt marshal properly during checksum calculation
* fixes error
2020-11-29 09:48:42 +02:00
Aliaksandr Valialkin
b7fcdb528d
app/{vmagent,victoria-metrics}: add -dryRun
option and make more clear handling for -promscrape.config.dryRun
2020-11-25 22:59:13 +02:00
Aliaksandr Valialkin
dabbf930d8
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:26:25 +02:00
BigFish
0acdab3ab9
Update main.go ( #922 )
...
fix spelling mistake
2020-11-23 17:33:17 +02:00
Aliaksandr Valialkin
7e8dcf9ddc
app/vmbackup: cosmetic fixes
2020-11-23 17:10:04 +02:00
Aliaksandr Valialkin
a724dde90a
app/vmselect: protect /tags/delSeries
with -deleteAuthKey
in the same way as /api/v1/admin/tsdb/delete_series
2020-11-23 15:35:59 +02:00
Aliaksandr Valialkin
f0c207fae2
app/vmselect: add /tags/delSeries
handler from Graphite Tags API
...
See https://graphite.readthedocs.io/en/stable/tags.html#removing-series-from-the-tagdb
2020-11-23 15:27:21 +02:00
Aliaksandr Valialkin
d3794eb994
app/{vminsert,vmselect}: move /tags/tagSeries
and /tags/tagMultiSeries
api from vminsert to vmselect
...
This is needed for consistency, since all the `/tags*` api handlers are located in vmselect.
2020-11-23 12:33:19 +02:00
Aliaksandr Valialkin
f765985947
lib/fs: replace fs.OpenReaderAt with fs.MustOpenReaderAt
...
All the callers for fs.OpenReaderAt expect that the file will be opened.
So it is better to log fatal error inside fs.MustOpenReaderAt instead of leaving this to the caller.
2020-11-23 09:57:21 +02:00
Nikolay
eec76718e9
Adds eureka service discovery ( #913 )
...
* Adds eureka service discovery
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/851
Netflix service discovery for AWS
* Apply suggestions from code review
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2020-11-20 13:38:12 +02:00
Aliaksandr Valialkin
2859a452d4
app/vmselect: add remoteAddr to slow query log in order to improve debuggability
...
This will simplify identifying the client that sends slow queries to VictoriaMetrics.
2020-11-18 20:38:32 +02:00
Nikolay
f818ab497b
Fixes snap script ( #909 )
2020-11-18 17:46:31 +03:00
Nikolay
c2afa3fdd7
adds snap package for victoria-metrics ( #904 )
...
* adds snap package for victoria-metrics
* Update README.md
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2020-11-18 02:00:06 +02:00
Aliaksandr Valialkin
266788be14
app/vmselect: use storage.NewSearchQuery() instead of constructing storage.SearchQuery in-place
...
This should prevent from bugs when AccountID and ProjectID aren't set in storage.SearchQuery.
2020-11-16 18:24:00 +02:00
Aliaksandr Valialkin
cf18df367d
app/vmselect/netstorage: apply Graphite filter after substituting __name__
with name
2020-11-16 15:52:16 +02:00
Aliaksandr Valialkin
2c67232565
app/vmselect/graphite: add /tags/autoComplete/values
handler from Graphite Tags API
2020-11-16 15:29:35 +02:00
Aliaksandr Valialkin
86f99c6b55
app/vmselect/graphite: add /tags/autoComplete/tags
handler from Graphite Tags API
...
See https://graphite.readthedocs.io/en/stable/tags.html#auto-complete-support
2020-11-16 14:50:05 +02:00
Aliaksandr Valialkin
3c1434118e
app/vmselect/prometheus: return __name__
label if match[]
query to /api/v1/labels
matches at least a single time series
2020-11-16 13:54:34 +02:00
Aliaksandr Valialkin
27a417bcd3
app/vmselect/prometheus: improve performance for /api/v1/labels
and /api/v1/label/<labelName>/values
on time ranges exceeding one day when match[]
query arg is set
2020-11-16 13:51:59 +02:00
Aliaksandr Valialkin
6fa806f1ca
app/vmselect/prometheus: fix deadlock in /api/v1/series
on a time range exceeding one day
2020-11-16 13:30:47 +02:00
Aliaksandr Valialkin
465923b181
app/vmselect/graphite: add /tags/findSeries handler from Graphite Tags API
...
See https://graphite.readthedocs.io/en/stable/tags.html#exploring-tags
2020-11-16 12:53:13 +02:00
Aliaksandr Valialkin
414cd39659
app/vmselect/graphite: apply filter then limit
2020-11-16 04:09:14 +02:00
Aliaksandr Valialkin
d100341394
app/vmselect/graphite: add /tags/<tag_name>
handler for Graphite Tags API
2020-11-16 03:42:25 +02:00
Aliaksandr Valialkin
6251762787
app/vmselect/graphite: add /tags
handler from Graphite Tags API
...
See https://graphite.readthedocs.io/en/stable/tags.html#exploring-tags
2020-11-16 03:00:01 +02:00
Aliaksandr Valialkin
48d033a198
app/vminsert: add /tags/tagSeries
and /tags/tagMultiSeries
handlers from Graphite Tags API
...
See https://graphite.readthedocs.io/en/stable/tags.html#adding-series-to-the-tagdb
2020-11-16 02:39:58 +02:00
Aliaksandr Valialkin
d9d01f976b
app/vmselect/promql: remove spikes from increase()
and delta()
results on time series with spare irregular data points
...
Do not take into account spare data point value if the next point will is located too far from the current point.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/894
2020-11-13 15:23:44 +02:00