Commit graph

7442 commits

Author SHA1 Message Date
Goutham Veeramachaneni b035c55a96
Step down and propose Ganesh as TSDB maintainer
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2019-10-15 12:42:20 +05:30
Jean-Baptiste Le Duigou 5146bb14ef adding unit test for target group (#6138)
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-14 23:48:08 +01:00
Jean-Baptiste Le Duigou 15de05d55e adding unit test for target group
Signed-off-by: Jean-Baptiste Le Duigou <jb.leduigou@gmail.com>
2019-10-14 21:05:11 +02:00
Krasi Georgiev b05b5f9a30
remove debug fmt.Println in tombstones. (#6135)
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-10-14 14:45:26 +03:00
Ganesh Vernekar 04c1c7974e
Clarify the branch in preparing the release (#6122)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-10-11 19:56:07 +05:30
Björn Rabenstein 4275c4a4f6
Merge pull request #6123 from yuxiaobo96/prometheus-check2
Correct spelling mistakes
2019-10-11 01:55:25 +02:00
Simon Pasquier cf3d74ed69 promql: fix potential panic in the query logger (#6094)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-10 16:09:08 +02:00
yuxiaobo 47e51c8b2b Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-10-10 18:46:27 +08:00
Alex Dzyoba e3882629ba promql: Move tests to testutil (#6103)
* promql: Move tests to testutil

Signed-off-by: Alex Dzyoba <alex@dzyoba.com>

* promql: Match error type via errors.As in tests

Signed-off-by: Alex Dzyoba <alex@dzyoba.com>

* promql: Remove unused `expectedList` func from lex_test.go

Signed-off-by: Alex Dzyoba <alex@dzyoba.com>
2019-10-09 18:06:53 -06:00
Callum Styan 81fa63006c Add additional shards/segment graphs to remote write dashboard.
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-09 09:59:02 -07:00
Krasi Georgiev 81d284f806
Merge the 2.13 release branch to master (#6117) 2019-10-09 17:41:46 +02:00
Frederic Branczyk 6b22997791
Merge pull request #6116 from simonpasquier/fix-sd-error-logs-on-cancel
discovery: don't log errors on context cancelation
2019-10-09 17:05:44 +02:00
Chris Marchbanks 6970f725c9 Fix panic in ARM builds of Prometheus (#6110)
An extra sync.Pool was added during a refactor which caused some 64 bit,
atomically accessed variables to no longer be 64 bit aligned. By moving
all atomically accessed variables to the beginning of the struct they
are guaranteed to be 64 bit aligned.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2019-10-09 15:52:29 +02:00
Simon Pasquier 8ec6f02854 discovery: don't log errors on context cancelation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-09 11:51:38 +02:00
陈谭军 0f022aa42b fix unreasonable goimports (#6115)
Signed-off-by: tanjunchen <2799194073@qq.com>
2019-10-09 09:43:56 +01:00
Giedrius Statkevičius ad58fc4765 ui: handle null response properly (#6071)
* web/ui: handle null case

The call might sometimes return /api/v1/label/__name__/values the
following:

```
{"status":"success","data":null}
```

Then the `index.js` file assumes that `data` is not `null`. However,
that assumption fails and then we get this error in the console:

```
graph.js?v=foo:317 Uncaught TypeError: Cannot read property 'length' of null
    at Object.success (graph.js?v=foo:317)
...
```

Then it becomes impossible to, for example, send a simple query like
`time()` and graph the results.

Fix it by using an empty array as the result if it is `null`.

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>

* ui: update static assets data

Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com>
2019-10-08 19:52:12 -06:00
Callum Styan 84ff928606 Make sure the remote write storage uses a dedupe logger. (#6113)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-10-08 11:42:00 -06:00
Björn Rabenstein 706f3b2d17
Merge pull request #6054 from nevill/refactor/manager_test
Refactor on discovery/manager_test.go
2019-10-08 13:11:28 +02:00
Björn Rabenstein fc945c4e8a
Merge pull request #6021 from prometheus/reload-checkpoint-async
Garbage collect asynchronously in the WAL Watcher
2019-10-08 11:01:13 +02:00
Ganesh Vernekar 4dfc7a2e77
Remove unnecessary lock in loadWAL (#6107)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-10-08 11:17:40 +05:30
Nevill 7465f27ea5 Refactor on discovery/manager_test.go
- Use testutil.ToFloat64 to collect testing metrics
- Declare ServiceDiscoveryConfig directly instead of calling Unmarshal on a piece of YAML

Signed-off-by: Nevill <nevill.dutt@gmail.com>
2019-10-08 10:18:48 +08:00
Chris Marchbanks 8df4bca470
Garbage collect asynchronously in the WAL Watcher
The WAL Watcher replays a checkpoint after it is created in order to
garbage collect series that no longer exist in the WAL. Currently the
garbage collection process is done serially with reading from the tip of
the WAL which can cause large delays in writing samples to remote
storage just after compaction occurs.

This also fixes a memory leak where dropped series are not cleaned up as
part of the SeriesReset process.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2019-10-07 14:36:10 -06:00
George Felix 895abbb7d0 Replaced test validations with testutils on storage/remote/codec_test.go (#6097)
* Replaced test validations with testutils on storage/remote/codec_test.go

Signed-off-by: George Felix <george.felix@ubeeqo.com>

* gofmt

Signed-off-by: George Felix <george.felix@ubeeqo.com>

* Removed shouldPass assertion

Signed-off-by: George Felix <gfelixc@gmail.com>

* Fixes to improve readability

Signed-off-by: George Felix <george.felix@ubeeqo.com>

* Fixes based on code review comments

Signed-off-by: George Felix <george.felix@ubeeqo.com>
2019-10-07 11:35:53 -06:00
Kyle Hinton 16f1e252f4 Small grammar fix on alerting rules doc (#6104)
Signed-off-by: Kyle Hinton <kyle.hinton0@gmail.com>
2019-10-07 10:17:36 +02:00
Krasi Georgiev 6ea4252299
cut 2.13 release (#6099)
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-10-04 13:32:24 +03:00
Simon Pasquier 35857b59de web/ui: fix for CVE-2019-10215 (#6098)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-10-04 12:18:54 +03:00
Ben Kochie 335021547c Include tsdb tool in builds (#6085) (#6089)
Add the tsdb tool to promu so that it's included in the release
tarballs.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-10-04 11:44:48 +03:00
Ganesh Vernekar 53ea6d6390
Allocate the shards only once while reading WAL (#6093)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-10-03 15:21:39 +05:30
Ganesh Vernekar 493ef2f771
Benchmark for loading WAL (#6081)
* Benchmark for loading WAL

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

* Add more cases

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-10-03 11:49:55 +05:30
Ben Kochie 0fbc8c13a7
Include tsdb tool in builds (#6085)
Add the tsdb tool to promu so that it's included in the release
tarballs.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-10-02 10:28:20 +02:00
Joe Elliott 95dc59ec7e Replaced t.Fatalf() with testutil.Assert() in buffer_test.go (#6084)
* Added Fatal method and used it in buffer_test

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Added period to meet contributing guidelines

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Removed fatal testutil method.  Refactored test cases to use testutil.Assert

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Added if found condition for clarity

Signed-off-by: Joe Elliott <number101010@gmail.com>
2019-10-02 06:28:08 +01:00
Björn Rabenstein 188917a16a
Merge pull request #6078 from abejide001/remove-punctuation-mark
Fix punctuation mark
2019-10-01 18:05:19 +02:00
abejidefemi1@gmail.com 5264b9628b fix punctuation mark
fix typo
Signed-off-by: abejidefemi1@gmail.com <abejidefemi1@gmail.com>
2019-10-01 09:02:11 +01:00
陈谭军 103f26d188 fix the wrong word (#6069)
Signed-off-by: chentanjun <2799194073@qq.com>
2019-09-30 09:54:55 -06:00
Björn Rabenstein ea2c836e1b
Merge pull request #6057 from snebel29/fix/management-api-return-code-when-disabled
Fix management api return code when lifecycle API is disabled
2019-09-30 11:43:28 +02:00
Sven Nebel 5a554df085 Nit: Improve doc text grammar (#6068)
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2019-09-28 14:38:51 +01:00
Krasi Georgiev 08c55c119f
cut 2.13.0-rc.0 pre-release (#6058)
* cut 2.13.0-rc.0 pre-release

Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-09-25 23:19:01 +03:00
Sven Nebel 27bbc235e0 Improve message when Lifecycle API is not enabled
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2019-09-25 10:57:21 +01:00
Sven Nebel d186d85649 Return 403 with PUT verb if lifecycle is not enabled
Signed-off-by: Sven Nebel <nebel.sven@gmail.com>
2019-09-25 10:57:11 +01:00
陈谭军 c6928b5c6e fix-up typo unkown->unknown (#6055)
Signed-off-by: chentanjun <2799194073@qq.com>
2019-09-25 09:51:43 +02:00
Simon Pasquier f6f23a2675
docs: update unit testing rules (#6051)
* docs: update unit testing rules

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

* More nits fixed

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-09-25 09:26:53 +02:00
Simon Pasquier ddff1480a7
cmd/promtool: improve output for PromQL tests (#6052)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-09-25 09:26:29 +02:00
Simon Pasquier e36ab7e192
prometheus-mixin: improve description of sample alerts (#6050)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-09-24 17:44:27 +02:00
Simon Pasquier 80bc8553be
discovery/file: fix flaky tests (#5948)
* discovery/file: fix flaky tests

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

* Fix typos

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

* Add copyFileTo() method

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-09-24 14:54:50 +02:00
Björn Rabenstein 52e0504f83
Merge pull request #5254 from nevill/fix-4890
Change prometheus_sd_configs_failed_total to Gauge
2019-09-24 12:10:40 +02:00
Nevill 55661ab004 Set failedConfigs only once right after registerProviders finished
Signed-off-by: Nevill <nevill.dutt@gmail.com>
2019-09-24 09:15:40 +08:00
johncming 8d3083e256 config: add test case for scrape interval larger than timeout. (#6037)
Signed-off-by: johncming <johncming@yahoo.com>
2019-09-23 13:26:56 +02:00
johncming 31a8ac3219 discovery/dns: add test case for SDConfig.UnmarshalYAML. (#6035)
* discovery/dns: Add code coverage.

Signed-off-by: johncming <johncming@yahoo.com>

* discovery/dns: add test case for SDConfig.UnmarshalYAML.

Signed-off-by: johncming <johncming@yahoo.com>
2019-09-23 13:26:11 +02:00
johncming 4757c69157 scrape: close manager gracefully at end. (#6044)
Signed-off-by: johncming <johncming@yahoo.com>
2019-09-23 12:28:37 +02:00
AllenZMC 1e62435960 fix wrong spells in live_reader.go (#5899)
* fix wrong spells in live_reader.go
* fix wrong spells in lex.go

Signed-off-by: czm <zhongming.chang@daocloud.io>
2019-09-21 16:36:33 +03:00