Commit graph

8326 commits

Author SHA1 Message Date
Ling Jin 9145200842
tsdb: fix unkown ref in log (#8048)
Signed-off-by: JinLingChristopher <jinl1037@hotmail.com>
2020-10-13 20:03:16 +05:30
Bartlomiej Plotka dee6ac274e
labels: Extra tests and comment for WithoutLabels method. (#8024)
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-10-13 08:57:53 +01:00
Björn Rabenstein 71577e45eb
Merge pull request #8044 from prometheus/beorn7/metrics
Instrumentation: Report valid configs in the respective metrics from the beginning
2020-10-12 23:32:02 +02:00
Arthur Silva Sens 4f45e201cc
Promtool tsdb list now prints block sizes (#7993)
* promtool tsdb list now prints blocks' size

Signed-off-by: arthursens <arthursens2005@gmail.com>
2020-10-12 23:15:40 +02:00
beorn7 0f3c1bf6cf Report valid configs in the respective metrics from the beginning
In #7399, an early validity check of the config was introduced to
prevent the scenario where an invalid config is only detected after a
possibly very long startup procedure. However, the respective success
metrics are not updated after the initial validation so that the
success metrics suggest an invalid config. If the startup procedure,
like replaying the WAL, really takes very long, alerts about invalid
config will trigger.

This commit sets the succes metrics after initial validation. They
will be set again after the "real" config (re-)load, but that
shouldn't be a problem. The metric now truthfully represents whenever
the config was successfully loaded, no matter if the result was then
thrown away (because it was just for validation) or actually used.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-10-12 21:30:59 +02:00
Jess G 90680b092c
Add a tsdb writer interface (#7950)
* add a tsdb writer interface

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* use block writer in tsdbutil block creator

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* pass thru context

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* use block writer in blockutil and also in tests

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* fix link err

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* add err handling for defer

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* add blockwriter test

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* mv initHead into NewBlockWriter, update tests

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>

* use blocksize arg, make test more concise

Signed-off-by: jessicagreben <jessicagrebens@gmail.com>
2020-10-12 17:04:20 +01:00
Brian Brazil cf273f21bb
Add a testcase for #8040 (#8042)
This was already fixed by #8013, but add a test case anyway
in case the regexp engine changes in future.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-10-12 12:17:29 +01:00
Frederic Branczyk 3240cf83f0
Merge pull request #8020 from brancz/cut-2.22.0-rc.0
*: Cut v2.22.0-rc.0
2020-10-08 15:52:19 +02:00
Frederic Branczyk be137435be
*: Cut v2.22.0-rc.0
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-10-08 13:52:40 +02:00
Frederic Branczyk 8703bc88cd
Merge pull request #8027 from brancz/v2.22-go-dep-update
*: Update dependencies
2020-10-08 12:08:11 +02:00
Frederic Branczyk 21a2e8c320
storage/remote/intern_test.go: Fix linting errors
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-10-08 09:50:37 +02:00
Frederic Branczyk b97a1bb7d1
web/ui/react-app/yarn.lock: Update UI dependencies
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-10-08 09:32:17 +02:00
Frederic Branczyk a58489857d
*: Update go dependencies
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2020-10-08 09:29:12 +02:00
Frederic Branczyk da3ea43242
Merge pull request #7976 from roidelapluie/tolerance
Introduce timestamp tolerance in scrapes
2020-10-08 09:21:19 +02:00
Siddhant Sinha d9dcf2c90f
Fixes #7982. Increase maxErrMsgLen value remote_write api (#8017)
Signed-off-by: Siddhant Sinha <sid.sinha94@gmail.com>
2020-10-08 00:13:09 +01:00
Julien Pivotto be5ba1a62d Fix wordings
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 21:44:36 +02:00
Julien Pivotto 4617d16b4b Specify the removal
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 18:32:04 +02:00
Julien Pivotto e2a2bf3c06 Add context
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 18:30:32 +02:00
Julien Pivotto 671f7c66e5 Adjust comment
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 18:28:02 +02:00
Julien Pivotto 627ff84599 Adjust flag
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 18:25:52 +02:00
garanews c38816828f
fix few typo (#8023)
Signed-off-by: garanews <puntogtg@tiscali.it>
2020-10-07 16:51:31 +01:00
Julien Pivotto 6b618ecf02 Better description
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 17:43:42 +02:00
Julien Pivotto 536dfb6234 Add an experimental, hidden flag
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-07 17:31:46 +02:00
Harold Dost bf7c771f54
promql: Organize legacy tests into appropriate files (#7989)
* Separate tests into:
** Aggregators
** Functions
** Operators
** Selectors
* Remove simple files and place tests into other files.
* Eliminate some of the _over_time tests since there are already plenty of
  edge cases present in the functions.test file.

Relates to #740

Signed-off-by: Harold Dost <harolddost@gmail.com>
2020-10-07 10:09:20 +01:00
Frederic Branczyk 6be3ebdfe7
Merge pull request #8015 from simonpasquier/bump-k8s-deps
Bump k8s dependencies + support k8s.io/klog/v2
2020-10-07 09:54:58 +02:00
Julien Pivotto 946819e16e
cmd/prometheus: Issue a warning on 32 bit archs (#8012)
* cmd/prometheus: Issue a warning on 32 bit archs

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-06 21:42:56 +02:00
Julien Pivotto b90c7a55da Simplify logic
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-06 21:17:16 +02:00
Simon Pasquier 9bb3555fe4 cmd/prometheus: support k8s.io/klog/v2
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-10-06 14:56:14 +02:00
Simon Pasquier 52c4da161f Bump Kubernetes dependencies
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2020-10-06 14:55:14 +02:00
Brian Brazil 924ce978b7
Don't do literal regex matching optimisation when case insensitive. (#8013)
Fixes #7994

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-10-06 13:16:26 +01:00
Julien Pivotto ccc1df3140 Fix comment
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-06 13:48:24 +02:00
Julien Pivotto 98e14611a5 Move the tolerance logic in the loop function.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-05 18:20:10 +02:00
Julien Pivotto 6544f95403 Introduce timestamp tolerance in scrapes
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-10-05 18:20:10 +02:00
Viren Negi 8dbfa14607
Add UserAgent to Hetzner Robot SD (#8008)
Fix #8003

Signed-off-by: Viren Negi <meetme2meat@gmail.com>
2020-10-05 13:34:41 +02:00
Brian Brazil 073e93c768
Gracefully handle unknown WAL record types. (#8004)
As we're looking to expand what's in the WAL,
having old Prometheus servers ignore the new record types
rather than treating them as corruption allows for better
upgrade/downgrade paths.

Adjust some tests accordingly, so they're still testing what they're
meant to test.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-10-05 10:09:59 +01:00
Viren Negi d253251266
Add UserAgent header to Eureka client (#8006)
Signed-off-by: Viren Negi <meetme2meat@gmail.com>
2020-10-02 21:09:56 +02:00
Ganesh Vernekar 50ae4e298b
Fix magic number in docs (#7998)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-10-01 15:05:01 +05:30
Julien Pivotto 6f13c60219
Scrape: Test that deduplicated targets are started (#7975)
This PR test that de-duplicated targets are actually started.

It is a unit test for this line of code:
072b9649a3/scrape/scrape.go (L457)
which is working and necessary but was not tested yet.

It also tests that scrapes are started in the normal way, in the targets
limit test.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-30 20:21:32 +02:00
TAY TS c9d827c1d0
Fix callback function bind with object as parameter (#7984)
Signed-off-by: TAY TS <taytzushieh@gmail.com>
2020-09-30 11:06:42 +02:00
Ganesh Vernekar f0d87b5d86
Encode and Decode method for tombstones (#7967)
* Encode and Decode method for tombstones

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

* Fix review comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-09-30 10:25:09 +05:30
Dustin Hooten 916dbd4c8a
React UI: Implement missing TSDB head stats section (#7876)
* React UI: Implement missing TSDB head stats section

Signed-off-by: Dustin Hooten <dhooten@splunk.com>

* Add break

Signed-off-by: Dustin Hooten <dhooten@splunk.com>
2020-09-29 22:05:33 +02:00
Łukasz Mierzwa 19c190b406
Add a rule_group_samples metric (#7977)
This new metric allows tracking how many samples did each rule group generate.

Signed-off-by: Łukasz Mierzwa <l.mierzwa@gmail.com>
2020-09-25 16:48:38 +01:00
Harkishen Singh 072b9649a3
Refactor vars to avoid test failures in storage/remote with -count > 1 (#7934)
* Refactor global vars to avoid failure with run test more than once.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* Register highestRecvTimestamp metric.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* Use local interner vars.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* Declare interner in write storage.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
2020-09-24 12:44:18 -06:00
Luke Chen 3364875ae5
update the doc link in internal_arthitecture.md (#7966)
* update the doc link in internal_arthitecture.md
* address reviewer's comment to remove out-dated wrapper

Signed-off-by: Luke Chen <showuon@gmail.com>
2020-09-24 09:10:41 +01:00
Julien Pivotto 7e2db3d092
Merge pull request #7968 from dstdfx/extend-version-cmd
Vendor prometheus/common v0.14.0
2020-09-23 16:31:34 +02:00
Daniil Rutskiy b10f071a25
Remove unused deps
Signed-off-by: Daniil Rutskiy <dstdfx@gmail.com>
2020-09-23 16:08:03 +03:00
Daniil Rutskiy 63457ef239
Vendor prometheus/common v0.14.0
Signed-off-by: Daniil Rutskiy <dstdfx@gmail.com>
2020-09-23 16:01:40 +03:00
Julien Pivotto b0145884d3
Merge pull request #7964 from prometheus/release-2.21
Eureka: Fix service discovery when compiled in 32-bit (#7961)
2020-09-22 20:07:08 +02:00
Julien Pivotto 184a871638
Eureka: Fix service discovery when compiled in 32-bit (#7961)
Java timestamps are causing issues when unmarshalling with a 32 bit
prometheus. It appears that we do not use those fields, so let's remove
them.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-22 17:53:26 +02:00
Max Neverov 7e1c27b853
Add tsdb startup duration metric (#7737)
* Add tsdb wal replay duration metric

Signed-off-by: Max Neverov <neverov.max@gmail.com>
2020-09-21 18:25:05 +02:00