Commit Graph

8831 Commits

Author SHA1 Message Date
songjiayang b781b5cac5
Refactor file discovery init function (#8891)
* Refactor file discovery init function

Combine to one init function like other discovery.

Signed-off-by: songjiayang <songjiayang1@gmail.com>
2021-06-04 14:43:24 +02:00
Julien Pivotto 6cbed8c569
Merge pull request #8878 from LeviHarrison/external-address-alerts
Access external address in alerts
2021-06-04 09:14:25 +02:00
Julien Pivotto 609ba54b8f
Mark body_size_limit as experimental. (#8886)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-06-02 16:32:08 +01:00
Julien Pivotto 20c6739adc
Merge pull request #8833 from hanjm/feature/add-scape-read-body-limit
Add body_size_limit to prevent bad targets response large body cause Prometheus server OOM (#8827)
2021-06-02 09:24:59 +02:00
TJ Hoplock dc22c65349
Add Linode Service Discovery (#8846)
* Add Linode Service Discovery

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2021-06-01 20:32:36 +02:00
Ben Kochie 85873cf59a
Merge pull request #8882 from prometheus/superq/fix_nightly_no_circle
Fix sync of CircleCI orb
2021-06-01 14:15:09 +02:00
SuperQ 141dcbb87f
Fix sync of CircleCI orb
Fix the case where there is no circleci config in a repo.
* Add echo_yellow() for warnings.
* Send echo_COLOR output to stderr to not be in function output.
* Make check_circleci_orb curl failure a warning.

Signed-off-by: SuperQ <superq@gmail.com>
2021-06-01 12:45:31 +02:00
Julien Pivotto 6eaff341fb
Merge pull request #8881 from colega/single-literal-regexp-value-querier-testcase
Single literal regexp value test case for querier
2021-06-01 11:59:53 +02:00
Oleg Zaytsev 6d99731303
Single literal regexp value testcase for querier
It's common to see queries like bar=~"foo" from machine generated
queries in the fronted. These are not evaluated as regexps, but are a
single-value-set, i.e. and equality matchings instead.

This is just a testcase for a single-value case.

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2021-06-01 09:57:48 +02:00
kongxs 632678a461
Fix spelling mistake (#8879)
* Fix spelling mistake

Signed-off-by: kjinan <2008kongxiangsheng@163.com>

* Update discovery/kubernetes/endpoints.go

Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
Signed-off-by: kjinan <2008kongxiangsheng@163.com>

Co-authored-by: Julien Pivotto <roidelapluie@gmail.com>
2021-06-01 00:49:29 +02:00
Julien Pivotto 8246f27580
Merge pull request #8880 from kcx2366425574/main
fix actuel to actual
2021-05-31 23:09:11 +02:00
kcx2366425574 17e230a6f2 fix actuel to actual
Signed-off-by: kcx2366425574 <18279911430@163.com>
2021-05-31 15:40:05 +08:00
Levi Harrison 7b18018012
Fixed tests
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-30 23:56:01 -04:00
Levi Harrison 51e4e2a526
Updated docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-30 23:36:05 -04:00
Levi Harrison 26274527df
Updated/added tests
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-30 23:35:41 -04:00
Levi Harrison 17ea8d006a
Added external URL access
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-30 23:35:26 -04:00
hanjm 1df05bfd49 Add body_size_limit to prevent bad targets response large body cause Prometheus server OOM (#8827)
Signed-off-by: hanjm <hanjinming@outlook.com>
2021-05-29 07:05:42 +08:00
Levi Harrison 2826fbeeb7
SD: Add target creation failure counter and change failure handling (#8786)
* Added metric and changed failure/drop strategy

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-05-28 23:50:59 +02:00
Julien Pivotto ae086c73cb
Merge pull request #8757 from songjiayang/refactor-processExternalLabels
Refactor processExternalLabels method with slice copy for left labels
2021-05-25 18:12:16 +02:00
ide-rea ef584a9df6
Improve wal.go segments sequential validation (#8859)
Signed-off-by: XiaoYu Zhang <ideoutrea@163.com>
2021-05-25 15:38:35 +05:30
Julien Pivotto 03b354d4d9
Merge pull request #8838 from eltociear/patch-1
Fix typo in storage.md
2021-05-22 16:22:36 +02:00
Julien Pivotto 8ccde7f45e
Merge pull request #8851 from kjinan/main
typos correct
2021-05-22 16:22:15 +02:00
Augustin Husson 1838068db5
bump codemirror-promql to v0.16.0 (#8856)
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2021-05-20 23:00:15 +02:00
Julien Pivotto ac49c1be4a
Merge pull request #8828 from roidelapluie/fix_prometheus_sd_discovered_targets
Fix the computation of prometheus_sd_discovered_targets
2021-05-20 21:17:15 +02:00
Ikko Ashimine 446e5cc160 Fix typo in storage.md
mulitple -> multiple

Signed-off-by: Ikko Ashimine <eltociear@gmail.com>
2021-05-20 20:32:03 +09:00
kjinan e1370eecde typos correct
Signed-off-by: kjinan <2008kongxiangsheng@163.com>
2021-05-20 09:52:33 +08:00
Julien Pivotto ea33dbf80f
Merge pull request #8822 from kcx2366425574/main
remove unused param
2021-05-19 23:15:17 +02:00
Ben Ye d95b097250
expose seriesToChunkEncoder (#8845)
Signed-off-by: yeya24 <yb532204897@gmail.com>
2021-05-19 13:01:35 +01:00
Julius Volz e6bb865ad4
Add upcoming release shepherds and new releases (#8842)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-05-18 21:43:38 +02:00
Ben Ye 0a8912433a
allow compact series merger to be configurable (#8836)
Signed-off-by: yeya24 <yb532204897@gmail.com>
2021-05-18 18:38:37 +02:00
Matthias Loibl 7e7efaba32
storage: Split chunks if more than 120 samples (#8582)
* storage: Split chunks if more than 120 samples

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* storage: Don't set maxt which is overwritten right away

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* storage: Improve comments on merge_test

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* storage: Improve comments and move code closer to usage

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* tsdb/tsdbutil: Add comment for GenerateSamples

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2021-05-18 18:37:16 +02:00
Chris Marchbanks 4bf7de3b56
Merge pull request #8841 from prometheus/release-2.27
Merge 2.27.1 into main
2021-05-18 09:04:03 -06:00
Julien Pivotto db7f0bcec2
Merge pull request from GHSA-vx57-7f4q-fpc7
* Do not remove /new because it is not part of the route parameter (CVE-2021-29622)

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

* Release 2.27.1

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-05-18 06:47:45 -06:00
Julien Pivotto 58a6c7d699
Merge pull request #8834 from SuperSandro2000/patch-1
Fix indentation
2021-05-16 23:08:08 +02:00
Sandro 0ffcddbee8
Fix indentation
Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
2021-05-16 05:27:05 +02:00
Julien Pivotto e1774b6f83 Fix the computation of prometheus_sd_discovered_targets
prometheus_sd_discovered_targets is wrongly calculated when there are
multiple SD configurations in place. One discovery manager can have
multiple groups coming from multiple service discoveries.

When multiple service discovery configs are used, we do not compute the
metric correctly, and instead just set the metric to one of the service
discoveries.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-05-14 22:38:37 +02:00
Julien Pivotto 11bcb93100
Merge pull request #8826 from kjinan/main
typos correct
2021-05-14 12:46:25 +02:00
Julien Pivotto a40743c4c0
Merge pull request #8819 from prometheus/release-2.27
Merge Relase 2.27 back to main
2021-05-14 09:50:31 +02:00
kjinan 24869ff2d0 typos correct
Signed-off-by: kjinan <2008kongxiangsheng@163.com>
2021-05-14 09:34:44 +08:00
kcx2366425574 be9c870b06 remove the param that is not used
Signed-off-by: kcx2366425574 <kuangcx@inspur.com>
2021-05-13 20:15:13 +08:00
Chris Marchbanks 24c9b61221
Release 2.27.0 (#8814)
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2021-05-12 11:32:12 -06:00
ide-rea 277bac622a
validate exemplar labelSet length first (#8816)
* ignore check exemplar labelSet length when append

Signed-off-by: XiaoYu Zhang <ideoutrea@163.com>

* validate exemplar labelSet length firstly

Signed-off-by: XiaoYu Zhang <ideoutrea@163.com>
2021-05-12 20:17:05 +05:30
songjiayang 9a01472780 Refactor processExternalLabels method with slice copy for left labels
Signed-off-by: songjiayang <songjiayang1@gmail.com>
2021-05-12 21:31:41 +08:00
Julius Volz e313ffa8ab
Fix "instant selector vector" typo in error messages (#8800)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-05-10 23:33:26 +02:00
Chris Marchbanks aedd4fa95c
Cut v2.27.0-rc.0 (#8793)
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2021-05-09 16:10:58 -06:00
Julien Pivotto 0a28f1ae9d
Merge pull request #8796 from hs0210/work
Fix golint issue
2021-05-08 14:57:30 +02:00
Hu Shuai 996848ef40 Fix golint issue
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2021-05-08 11:45:29 +08:00
Chris Marchbanks 5b61ac4412
Merge pull request #8792 from prometheus/v2-27-update-dependencies
Update dependencies
2021-05-07 07:48:13 -06:00
Callum Styan 8fd73b1d28
Add Exemplar Remote Write support (#8296)
* Write exemplars to the WAL and send them over remote write.

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

* Update example for exemplars, print data in a more obvious format.

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

* Add metrics for remote write of exemplars.

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

* Fix incorrect slices passed to send in remote write.

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

* We need to unregister the new metrics.

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

* Address review comments

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

* Order of exemplar append vs write exemplar to WAL needs to change.

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

* Several fixes to prevent sending uninitialized or incorrect samples with an exemplar. Fix dropping exemplar for missing series. Add tests for queue_manager sending exemplars

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Store both samples and exemplars in the same timeseries buffer to remove the alloc when building final request, keep sub-slices in separate buffers for re-use

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Condense sample/exemplar delivery tests to parameterized sub-tests

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Rename test methods for clarity now that they also handle exemplars

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Rename counter variable. Fix instances where metrics were not updated correctly

Signed-off-by: Martin Disibio <mdisibio@gmail.com>

* Add exemplars to LoadWAL benchmark

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

* last exemplars timestamp metric needs to convert value to seconds with
ms precision

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

* Process exemplar records in a separate go routine when loading the WAL.

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

* Address review comments related to clarifying comments and variable
names. Also refactor sample/exemplar to enqueue prompb types.

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

* Regenerate types proto with comments, update protoc version again.

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

* Put remote write of exemplars behind a feature flag.

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

* Address some of Ganesh's review comments.

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

* Move exemplar remote write feature flag to a config file field.

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

* Address Bartek's review comments.

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

* Don't allocate exemplar buffers in queue_manager if we're not going to
send exemplars over remote write.

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

* Add ValidateExemplar function, validate exemplars when appending to head
and log them all to WAL before adding them to exemplar storage.

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

* Address more reivew comments from Ganesh.

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

* Add exemplar total label length check.

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

* Address a few last review comments

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

Co-authored-by: Martin Disibio <mdisibio@gmail.com>
2021-05-06 13:53:52 -07:00
Marco Pracucci 4b49ffbad5
Stop the bleed on chunk mapper panic (#8723)
* Added test to reproduce panic on TSDB head chunks truncated while querying

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

* Added test for Querier too

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

* Stop the bleed on mmap-ed head chunks panic

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

* Lower memory pressure in tests to ensure it doesn't OOM

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

* Skip TestQuerier_ShouldNotPanicIfHeadChunkIsTruncatedWhileReadingQueriedChunks

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

* Experiment to not trigger runtime.GC() continuously

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

* Try to fix test in CI

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

* Do not call runtime.GC() at all

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

* I have no idea why it's failing in CI, skipping tests

Signed-off-by: Marco Pracucci <marco@pracucci.com>
2021-05-06 14:18:59 -06:00