Commit Graph

8219 Commits

Author SHA1 Message Date
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
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
David Leadbeater 77c784ac93
Ensure alert rules are marked as restored in unit tests (#7661)
This makes sure the ALERTS timeseries is created when unit testing
alerting rules.

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2020-09-21 18:15:34 +02:00
李国忠 4a52faf2ae
Unnecessary go routine spawn. (#7951)
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
2020-09-21 11:29:03 +01:00
Jorge Vallecillo 7aa5fb01bf
tsdb/chunks/head_chunks_test.go: Fix typo (#7953)
tsdb/db_test.go: Fix typo

Signed-off-by: Jorge Vallecillo <jorgevallecilloc@gmail.com>
2020-09-20 18:42:01 +01:00
Tobias Klauser b5b3bc34da
tsdb/fileutil: Use FcntlFstore from golang.org/x/sys/unix (#7949)
Direct syscalls using syscall.Syscall(SYS_*, ...) should no longer be
used on darwin, see [1]. Instead, use the FcntlFstore libSystem wrapper
provided by the golang.org/x/sys/unix package to implement
preallocFixed.

[1] https://golang.org/doc/go1.12#darwin

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-09-19 10:57:13 +01:00