Commit graph

8182 commits

Author SHA1 Message Date
Bartlomiej Plotka eb27ddd3f2 Moved to v2 xxhash for improvements.
New:

/tmp/___BenchmarkLabels_Hash_in_github_com_prometheus_prometheus_pkg_labels -test.v -test.bench ^\QBenchmarkLabels_Hash\E$ -test.run ^$ -test.benchtime 10s
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/pkg/labels
BenchmarkLabels_Hash
BenchmarkLabels_Hash/typical_labels_under_1KB
BenchmarkLabels_Hash/typical_labels_under_1KB-12         	53447894	       221 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/bigger_labels_over_1KB
BenchmarkLabels_Hash/bigger_labels_over_1KB-12           	42341754	       326 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/extremely_large_label_value_10MB
BenchmarkLabels_Hash/extremely_large_label_value_10MB-12 	   10000	   1248546 ns/op	       0 B/op	       0 allocs/op
PASS

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-10-13 10:03:46 +02:00
Bartlomiej Plotka f226cb6138 Addressed Kemal's comment.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-10-13 10:03:43 +02:00
Bartlomiej Plotka 61160463cc labels: Reduce allocated memory by Hash method in edge cases; Added tests.
Old:
/tmp/___BenchmarkLabels_Hash_in_github_com_prometheus_prometheus_pkg_labels -test.v -test.bench ^\QBenchmarkLabels_Hash\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/pkg/labels
BenchmarkLabels_Hash
BenchmarkLabels_Hash/typical_labels_under_1KB
BenchmarkLabels_Hash/typical_labels_under_1KB-12         	 5366161	       259 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/bigger_labels_over_1KB
BenchmarkLabels_Hash/bigger_labels_over_1KB-12           	 1700371	       767 ns/op	    2048 B/op	       1 allocs/op
BenchmarkLabels_Hash/extremely_large_label_value_10MB
BenchmarkLabels_Hash/extremely_large_label_value_10MB-12 	     356	   3743115 ns/op	10523442 B/op	       1 allocs/op
PASS

New:
/tmp/___BenchmarkLabels_Hash_in_github_com_prometheus_prometheus_pkg_labels -test.v -test.bench ^\QBenchmarkLabels_Hash\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/pkg/labels
BenchmarkLabels_Hash
BenchmarkLabels_Hash/typical_labels_under_1KB
BenchmarkLabels_Hash/typical_labels_under_1KB-12         	 4758883	       259 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/bigger_labels_over_1KB
BenchmarkLabels_Hash/bigger_labels_over_1KB-12           	 3324492	       357 ns/op	      80 B/op	       1 allocs/op
BenchmarkLabels_Hash/extremely_large_label_value_10MB
BenchmarkLabels_Hash/extremely_large_label_value_10MB-12 	    1087	   1083949 ns/op	    9734 B/op	       1 allocs/op
PASS

Process finished with exit code 0

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-10-13 10:03:40 +02: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
Christian Hoffmann db13003721
ui: clarify alert state toggle via checkbox icon (#7936)
The current meaning of the alert firing/pending/inactive
toggle seems ambiguouos as #7460 demonstrates.
This commit adds a checkbox icon to clarify the
active state of the button.

Signed-off-by: Christian Hoffmann <mail@hoffmann-christian.info>
2020-09-16 15:02:37 +02:00
Luke Chen 68d65a8ac5
Add the "assets" make target and change directory note in readme (#7908)
* add the "assets" make target and change directory note in readme

Signed-off-by: Luke Chen <showuon@gmail.com>

* address reviewer's comment

Signed-off-by: Luke Chen <showuon@gmail.com>
2020-09-16 15:01:48 +02:00
Julius Volz fc416e309b
RELEASE.md: add instructions for React dep updates (#6831)
* RELEASE.md: add instructions for React dep updates

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-09-16 13:36:53 +02:00
venkatbvc 6f28c46f4c
Updating storage.md for retention.size (#7942)
Signed-off-by: venkatbvc <chalapathirao@gmail.com>
2020-09-16 10:49:02 +05:30
Julien Pivotto e208afcc95
web: Remove APIv2 (#7935)
* web: Remove APIv2

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-15 09:30:55 +02:00
Luke Chen 7de6046d1e
update the protoc version to 3.12.3 in readme.md (#7931)
Signed-off-by: Luke Chen <showuon@gmail.com>
2020-09-14 09:08:27 +01:00
Julien Pivotto ed2a483beb
Merge pull request #7929 from prometheus/release-2.21
Merge release 2.21 in master
2020-09-11 14:26:56 +02:00
Julien Pivotto e83ef207b6
Release 2.21.0 (#7925)
* Release 2.21.0

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-11 13:07:23 +02:00
Xiaochao Dong a282d25099
tsdb: remove duplicate values set to reduce memory usage(map overhead) (#7915)
Signed-off-by: Xiaochao Dong (@damnever) <dxc.wolf@gmail.com>
2020-09-10 20:35:47 +05:30
Bryan Boreham 90fc6be70f
Default to bigger remote_write sends (#5267)
* Default to bigger remote_write sends

Raise the default MaxSamplesPerSend to amortise the cost of remote
calls across more samples. Lower MaxShards to keep the expected max
memory usage within reason.

Signed-off-by: Bryan Boreham <bryan@weave.works>

* Change default Capacity to 2500

To maintain ratio with MaxSamplesPerSend

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2020-09-09 14:00:23 -06:00
Julien Pivotto 538f6b7dd1
Fix missing remote read spans (#7914) (#7916)
The remote read client needs to use the nethttp.Transport wrapper in
order for spans to be instrumented properly.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>

Co-authored-by: Chris Marchbanks <csmarchbanks@gmail.com>
2020-09-09 17:39:59 +02:00
Chris Marchbanks f0f8e50567
Fix missing remote read spans (#7914)
The remote read client needs to use the nethttp.Transport wrapper in
order for spans to be instrumented properly.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2020-09-09 14:03:48 +02:00
Harkishen Singh fc8e769d71
Use ASSIGN when using = inside braces (#7911)
* Fix EQL when using = inside braces.

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

* EQL => EQLC and ASSIGN => EQL

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

* Aligned yacc code.

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
2020-09-09 15:40:02 +05:30
Julien Pivotto a6ee1f8517
Merge pull request #7913 from prometheus/release-2.21
Merge release 2.21 into master
2020-09-09 11:08:32 +02:00
Julien Pivotto e55b0be9b7
Release 2.21.0-rc.1 (#7868)
Add missing items in the changelog

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-08 20:48:20 +02:00
Bartlomiej Plotka 088fcc9e48
Fixed iterator regression: Avoid using heap for each sample when iterating. (#7900)
* Fixed iterator regression: Avoid using heap for each sample when iterating.

Fixes: https://github.com/prometheus/prometheus/issues/7873

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

* Addressed comments.

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

* Check for .At() called after .Next() returned false

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

* More comments

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

Co-authored-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-09-08 16:23:01 +02:00
Anonymous 8219b442c8
rules: Remove redundant RLock to avoid double RLock (#7183)
Signed-off-by: BurtonQin <bobbqqin@gmail.com>
2020-09-07 18:58:21 +01:00
Justin Walz 808a14569d
Update alerting_rules.md (#7252)
Update `ALERTS` example be more meta-syntactic.

Signed-off-by: Justin Walz <justin.walz10@gmail.com>
2020-09-07 17:30:01 +01:00
Deepjyoti Mondal c8ad79efdc
Fixes #6127 : Add Collapse All button (#6957)
The collapse all option as suggested in the corresponding issue
has been implemented in this PR.

Signed-off-by: Deepjyoti Mondal <djmdeveloper060796@gmail.com>
2020-09-07 16:54:54 +02:00
zhulongcheng 5ea6bdca1f
tsdb: sync temporary checkpoint directory before rename (#7004)
Signed-off-by: zhulongcheng <zhulongcheng.dev@gmail.com>
2020-09-07 20:04:49 +05:30
Christian Hoffmann 51306cb158
docs: add promtool version in rule migration cmd (#6989)
`promtool update rules` is no longer available after Prometheus 2.5.
Document this to avoid confusion such as in #6988.

Signed-off-by: Christian Hoffmann <mail@hoffmann-christian.info>
2020-09-07 16:30:07 +02:00
Julius Volz 01daddeb75
Fix styling bug for target labels with special names (#7902)
Adding the label name as a CSS class can break styling and other
behavior when the label name has a special meaning in CSS. E.g. the
"container" label was displayed at 100% width because it was interpreted
to be a bootstrap container layout element.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-09-06 22:10:25 +02:00
Hrishikesh Barman f8c8adfd67
Update all_nodepools_deleted to all_nodes_deleted in prombench workflow
Signed-off-by: Drumil Patel <drumilpatel720@gmail.com>
2020-09-05 21:03:56 +05:30
Bartlomiej Plotka a399227a9f Revert "Fixed iterator regression: Avoid using heap for each sample when iterating."
This reverts commit 2c8b2c5915.
2020-09-04 17:10:42 +01:00
Julien Pivotto 2c8b2c5915 Fixed iterator regression: Avoid using heap for each sample when iterating.
Fixes: https://github.com/prometheus/prometheus/issues/7873

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-09-04 17:09:40 +01:00
Anand Sanmukhani f4a1b3cef6
Rename remote.newReadClient() to remote.NewReadClient() (#7881)
This should make the `NewReadClient()` exported outside the `remote` package

Signed-off-by: Anand Sanmukhani <asanmukh@redhat.com>
2020-09-02 17:15:10 +01:00
Ben Kochie 7b4a2ca870
Bump promu version (#7880)
Upgrade to promu 0.6.0.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-09-02 17:03:52 +01:00
johncming 75ae384192
tsdb: remove redundant fields. (#7869)
Signed-off-by: johncming <johncming@yahoo.com>
2020-09-02 17:03:21 +01:00
iurii bd53b5ff37
Unnecessary go routine spawn. (#7879)
* Unnecessary go routine spawn.
* Remove unnecessary local variable creation.

Signed-off-by: iurii <iurii@coins.ph>
Co-authored-by: iurii <iurii@coins.ph>
2020-09-02 16:26:42 +01:00
Ganesh Vernekar 2255b6f62f
Refactor WAL.Segments method to be part of the wal package (#6477)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2020-09-01 14:46:57 +05:30
showuon dba729f6b6
Referring to configuration.md, to have a Generic placeholders definition section (#7875)
Signed-off-by: Luke Chen <showuon@gmail.com>
2020-09-01 09:37:09 +01:00
johncming 252265fa81
tsdb/chunks: remove un-used code. (#6944)
Signed-off-by: johncming <johncming@yahoo.com>
2020-08-31 16:55:47 +02:00
Jaga Santagostino 3ebffa7e20
add key to StatusWithStatusIndicator component in loop (#6879)
Signed-off-by: Jaga Santagostino <jagasantagostino@gmail.com>
2020-08-31 16:47:35 +02:00
Lars Kellogg-Stedman e4cfa742a5
docs: minor corrections to the docker documentation (#6869)
The documentation referenced "data volume containers", which were
superseded by named volume support in Docker several years ago.

There were to bind-mounting examples in the docs that are effectively
doing the same thing, but the description of the second was somewhat
erroneous.

Signed-off-by: Lars Kellogg-Stedman <lars@redhat.com>
2020-08-31 15:44:08 +01:00
Julien Pivotto a5366cb236
Fix rules.html afte name cleaup in #7841 (#7865)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-31 14:00:46 +02:00
Lukas Kämmerling c49d8680ce
Fix Hetzner Robot SD decoding with non HTTP 2xx (#7872)
* Fix Hetzner Robot SD trying to decode response when a non 2xx HTTP code was returned

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
2020-08-31 13:24:39 +02:00
showuon 791b84830d
Update the storage.md to fix typo, and some grammar/format issue (#7871)
* Update the storage.md to fix typo, and some grammar/format issue

Signed-off-by: Luke Chen <showuon@gmail.com>
2020-08-31 09:50:42 +01:00