Commit Graph

7835 Commits

Author SHA1 Message Date
Bartlomiej Plotka aff32443f9
Merge pull request #7369 from prometheus/get2.18.2-to-master
Pulled 2.18.2 to master
2020-06-09 14:50:17 +01:00
Bartlomiej Plotka 8f0a924be9 Merge branch 'release-2.18' into get2.18.2-to-master 2020-06-09 10:04:44 +01:00
Bartlomiej Plotka a6600f564e
Merge pull request #7368 from prometheus/bugfix-cut-2.18.2-2
Cut 2.18.2 release with query bug fix
2020-06-09 10:01:29 +01:00
Bartlomiej Plotka 1a4c97ec51
Revert "Cut 2.18.2 release with query bug fix. (#7364)" (#7367)
This reverts commit 76261150b7.
2020-06-09 09:56:28 +01:00
Bartlomiej Plotka 76261150b7
Cut 2.18.2 release with query bug fix. (#7364)
* Fixed incorrect query results caused by buffer reuse in merge adapter (#7361)

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Cut 2.18.2 + cherry pick of query bugfix.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

Co-authored-by: Marco Pracucci <marco@pracucci.com>
2020-06-09 09:52:36 +01:00
Bartlomiej Plotka 0f34535009 Cut 2.18.2 + cherry pick of query bugfix.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-06-09 06:49:26 +01:00
Marco Pracucci bc1d7d7f27 Fixed incorrect query results caused by buffer reuse in merge adapter (#7361)
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2020-06-09 05:45:18 +01:00
Hu Shuai e5ffa8c9a0
Add some unit tests for pkg/labels/labels.go (#7358)
This PR is about adding some unit tests for pkg/labels/labels.go.

Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-06-08 08:46:21 +01:00
Ben Kochie e963d953ea
Update yarn.lock (#7356)
Fixes websocket-extensions security warning.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-07 17:56:31 +02:00
Julien Pivotto 4284dd1f1b
promql: cleanup: use errors.As (#7351)
This was TODO because circleci was not in go1.13 yet.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-05 19:51:25 +02:00
Hu Shuai 6ff4814a49
Add some unit tests for pkg/labels/labels.go (#7347)
This PR is about adding some unit tests for pkg/labels/labels.go.

Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-06-05 09:48:33 +01:00
Bert Hartmann 82c7cd320a
increase the remote write bucket range (#7323)
* increase the remote write bucket range

Increase the range of remote write buckets to capture times above 10s for laggy scenarios
Buckets had been: {.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}
Buckets are now: {0.03125, 0.0625, 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512}

Signed-off-by: Bert Hartmann <berthartm@gmail.com>

* revert back to DefBuckets with addons to be backwards compatible

Signed-off-by: Bert Hartmann <berthartm@gmail.com>

* shuffle the buckets to maintain 2-2.5x increases

Signed-off-by: Bert Hartmann <berthartm@gmail.com>
2020-06-04 13:54:47 -06:00
Brian Brazil f9d21f10ec
Only relabelling should apply for scrape_samples_scraped_post_relabelling. (#7342)
More consistent variable names.

Fixes #7298

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-06-04 16:00:37 +01:00
Ganesh Vernekar c729df3d0f
Update dependencies (#7331)
* Update dependencies

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Update protos

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-06-04 11:25:56 +05:30
Peter Štibraný ff80690a6e
Optimise lowWatermark in Isolation (#7332)
* Track open appenders in doubly-linked list to make lowWatermark O(1).
* Use RW locks.
* Added BenchmarkIsolationWithState.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
2020-06-03 20:09:05 +02:00
Nicole J 5e9bd17b1f
added the prometheus_remote_storage_remote_read_queries_total (#7328)
* added the prometheus_remote_storage_remote_read_queries_total query

Signed-off-by: njingco <jingco.nicole@gmail.com>

* adjusted the help label of remoteReadQueriesTotal

Signed-off-by: njingco <jingco.nicole@gmail.com>
2020-06-03 10:30:52 -07:00
Frederic Branczyk 18d9ebf0ff
Merge pull request #7093 from tariq1890/upd_k8s
update kubernetes to v1.18.x and update the ingress apiVersion
2020-06-02 18:12:29 +02:00
Ben Kochie 10c6105d25
Merge pull request #7324 from prometheus/superq/tag-release-alias
Update RELEASE doc
2020-06-02 17:57:51 +02:00
Ben Kochie 5382ce867b
Update RELEASE doc
* Simplify tag snipit slightly.
* Add a git alias helper.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-02 15:13:11 +02:00
Tariq Ibrahim 06a6621b6c
update kubernetes to v1.18.x and update ingress apiVersion
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
2020-06-01 08:26:50 -07:00
Cody Boggs 3268eac2dd
Trace Remote Write requests (#7206)
* Trace Remote Write requests

Signed-off-by: Cody Boggs <cboggs@splunk.com>

* Refactor store attempts to keep code flow clearer, and avoid so many places to deal with span finishing

Signed-off-by: Cody Boggs <cboggs@splunk.com>
2020-06-01 09:21:13 -06:00
B++ d6374ae1b6
Return NaN for histogram_quantile when buckets have 0 observations (#7318)
Signed-off-by: jberny <f.bernardi89@gmail.com>
2020-06-01 09:40:39 +01:00
Julien Pivotto 4424d2c3a4
Install go 1.14 in windows (#7310)
* Update Go in Windows CI

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>

* No vet

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-01 08:45:30 +02:00
Julien Pivotto 58c445e6ef
Fuzz: limit input size (#7317)
We know that fuzzParseExpr and fuzzParseMetricSelector make use of heavy
things like regexes, which take a fairly big amount of memory.

OSS-Fuzz does not offer a proper way to increase the memory [1], therefore
we limit the input size [2].

[1] https://google.github.io/oss-fuzz/faq/#how-do-you-handle-timeouts-and-ooms
[2] https://google.github.io/oss-fuzz/getting-started/new-project-guide/#input-size

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-31 09:42:56 +02:00
Jess G fdc49fae5b
Added time range parameters to labelNames API (#7288)
* add time range params to labelNames api

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* evaluate min/max time range when reading labels from the head

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* add time range params to labelValues api

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* fix test, add docs

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* add a test for head min max range

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* fix test to match comment

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* address CR comments

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* combine vars only used once

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* add time range params to labelNames api

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* evaluate min/max time range when reading labels from the head

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* add time range params to labelValues api

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* fix test, add docs

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* add a test for head min max range

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* fix test to match comment

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* address CR comments

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* combine vars only used once

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* fix test

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* restart ci

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>

* use range expectedLabelNames instead of range actualLabelNames in test

Signed-off-by: jessicagreben <Jessica.greben1+github@gmail.com>
2020-05-30 13:50:09 +01:00
Julien Pivotto 2209fa98b4
Fix consul_sd_config to follow types convention (#7316)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-29 21:20:37 +02:00
Ganesh Vernekar a1355eb7c7
Remove time based m-map file creation (#7314)
* Remove time based m-map file creation

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix review comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-05-29 20:08:41 +05:30
Ben Kochie c7d9516695
Bump jquery to fix secuirty warning (#7311)
* Use major version dependency to make updates easier.
* Pin to >= 3.5.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-05-29 15:40:39 +02:00
Ganesh Vernekar 83619aa9ac
Preallocate m-map file only for Windows (#7306)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-05-28 20:24:19 +05:30
Brian Brazil 3932a7149f
Correctly track points no longer used by matrixIterSlice's slice. (#7307)
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-05-28 13:36:30 +01:00
TakumaNakagame 7a541bd9a7
fix document rabbitmq example (#7297)
* remove prometheus.io annotations and add scrape_configs

Signed-off-by: TakumaNakagame <5129906+TakumaNakagame@users.noreply.github.com>
2020-05-27 11:34:05 +01:00
Guangwen Feng 2393d6137b
Add unit test case for func Type in record.go (#7082)
Signed-off-by: Guangwen Feng <fenggw-fnst@cn.fujitsu.com>
2020-05-27 12:08:33 +05:30
Brian Brazil c9565f08aa
Pass reference to checkAddError so appendErrors is updated. (#7294)
This was preventing the warnings from being logged.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-05-26 15:14:55 +01:00
Hrishikesh Barman 4658ce60d1
Updated action workflow files to work with new test infra Dockerimages. (#7287) 2020-05-24 12:24:18 +03:00
Jop Zinkweg 1f69c38ba4
Add discovery support for triton compute nodes (#7250)
Added optional configuration item role, defaults to 'container' (backwards-compatible).
Setting role to 'cn' will discover compute nodes instead.

Human-friendly compute node hostname discovery depends on cmon 1.7.0:
c1a2aeca36

Adjust testcases to use discovery config per case as two different types are now supported.

Updated documentation:
* new role setting
* clarify what the name 'container' covers as triton uses different names in different locations

Signed-off-by: jzinkweg <jzinkweg@gmail.com>
2020-05-22 16:19:21 +01:00
Krasimir Georgiev f4dd45609a
Use min and maxt of the range head when creating a block (#7282)
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2020-05-22 17:00:06 +05:30
Krasimir Georgiev 09df8d94e0
More explicit chunks and head error handling. (#7277) 2020-05-22 12:03:23 +03:00
Ganesh Vernekar 1c99adb9fd
Callbacks for lifecycle of series in TSDB (#7159)
* Callbacks for lifecycle of series in TSDB

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Add more comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-05-20 18:52:08 +05:30
Ganesh Vernekar 8755434350
Add @codesome and @beorn7 for next 2 releases (#7276)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-05-19 19:07:47 +01:00
gotjosh bfcd9282a8
API: Allow AlertmanagerRetriever and RulesRetriever to receive a Context (#7256)
* API: Allow AlertmanagerRetriever and RulesRetriever to receive a
Context

Signed-off-by: gotjosh <josue@grafana.com>

* Use single line functions where possible

Signed-off-by: gotjosh <josue@grafana.com>
2020-05-18 19:02:32 +01:00
Simon Pasquier 44cdd3e768
Makefile.common: add 'update-go-deps' target (#7259)
* Makefile.common: add 'update-deps' target

Also updated the RELEASE.md document to adjust the instructions about
dependencies management.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Rename udpdate-deps -> update-go-deps

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Remove use of jq

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Use $(GO) instead of literal "go"

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-05-18 11:43:45 +02:00
Julius Volz 6e19c4697d
React UI: Don't null out data when clicking on current tab (#7243)
Fixes https://github.com/prometheus/prometheus/issues/7241

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-05-15 14:03:15 +02:00
Julien Pivotto 000ba35277
Update prometheus/common to v0.10.0 (#7258)
Enable HTTP/2.
Fixes #5938
Fixes #7237

Add support for "0" duration.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-14 10:58:14 +02:00
Callum Styan 5bb7f00d00
change labelset comparison in promql engine to avoid false positive during detection of duplicates (#7058)
* Use go1.14 new hash/maphash to hash both RHS and LHS instead of XOR'ing
which has been resulting in hash collisions.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Refactor engine labelset signature generation, just use labels.Labels
instead of hashes.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address review comments; function comments + store result of
lhs.String+rhs.String as key.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Replace all signatureFunc usage with signatureFuncString.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Make optimizations to labels String function and generation of rhs+lhs
as string in resultMetric.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Use separate string functions that don't use strconv just for engine
maps.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Use a byte invalid separator instead of quoting and have a buffer
attached to EvalNodeHelper instead of using a global pool in the labels
package.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address review comments.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address more review comments, labels has a function that now builds a
byte slice without turning it into a string.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Use two different non-ascii hex codes as byte separators between labels
and between sets of labels when building bytes of a Labels struct.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* We only need the 2nd byte invalid sep. at the beginning of a
labels.Bytes

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-05-12 14:03:15 -07:00
Hu Shuai da217cbde2
Add some unit tests for funcs in pkg/labels/labels.go (#7116)
This PR is about adding some unit tests for funcs in pkg/labels/labels.go.

Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2020-05-12 10:42:21 +01:00
Bartlomiej Plotka 5fa12ae0ef
changelog: Fixed wrong link to federation PR. (#7205)
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-05-11 13:00:50 +01:00
Arthur Silva Sens 7727b9012e
Correction of misleading help text(#5142) (#7231)
* Correction of misleading help text(#5142)

Signed-off-by: arthursens <arthursens2005@gmail.com>
2020-05-11 12:15:01 +01:00
Brian Brazil 5368066b58
Give a bit more slack for alertmanager send failures. (#7228)
Fixes #5277

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-05-09 05:37:46 +01:00
Julien Pivotto 9e265aba10
Merge pull request #7225 from prometheus/release-2.18
[Merge without Squash] Merge release-2.18 back to master for 2.18.1 fixes.
2020-05-07 21:23:59 +02:00
Julien Pivotto b03bc16623
Update yamlv3 (#7207)
This update fixes https://github.com/go-yaml/yaml/issues/575, required
by downstream.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-07 19:38:29 +01:00