Commit graph

7089 commits

Author SHA1 Message Date
Bevisy b7cdd3e840 Exhaust request body before closing it (#5596)
Signed-off-by: bevisy <binbin36520@gmail.com>
2019-05-25 11:27:12 +01:00
Callum Styan 562e93e8e6 Always create a new clean segment when starting the WAL. (#608)
* Always create a new clean segment when starting the WAL.
* Ensure we flush the last page after repairing and before recreating the
new segment in Repair.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-05-24 19:33:27 +01:00
Björn Rabenstein 2de8ba4708
Merge pull request #5584 from prometheus/beorn7/release
Cut v2.10.0-rc.0
2019-05-22 14:18:48 +02:00
beorn7 2f0a929126 Cut v2.10.0-rc.0
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-22 12:46:37 +02:00
Dmitry Shmulevich d81df5609d fix nil pointer dereference in azure discovery (#5587)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@sysdig.com>
2019-05-21 20:03:24 +01:00
Alex Salt d6a4daa26a web api: handle alert with Infinity/NaN values (#5582)
* web/api/v1: alert value as string in alert/rules endpoints

Signed-off-by: Alexander Saltykov <alexander-s@yandex-team.ru>
2019-05-21 10:41:54 +01:00
Björn Rabenstein 0652b518da
Merge pull request #5583 from tariq1890/update_consul
update consul and dns dependencies
2019-05-21 01:28:07 +02:00
Tariq Ibrahim 1c0df5b7d1
update consul and dns dependencies
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
2019-05-20 11:09:08 -07:00
Björn Rabenstein aeb3af485c
Merge pull request #5573 from tariq1890/fix_html
fix minor issue in the <a> tag of rules.html
2019-05-20 14:04:33 +02:00
Björn Rabenstein 6b956704b4
Merge pull request #5576 from prometheus/beorn7/mod
Update prometheus/client_golang and prometheus/tsdb modules
2019-05-18 00:56:00 +02:00
beorn7 aff4738f33 Adjust TestQueryRange to new Prometheus API client
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-17 18:09:47 +02:00
beorn7 12536f3027 Update prometheus/client_golang and prometheus/tsdb modules
Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-17 14:54:49 +02:00
Krasi Georgiev d48a5e2d5c
Release 0.8.0 (#607)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-05-17 13:39:03 +03:00
Chris Marchbanks 840872a6f8 Fix remote storage config not updating correctly (#5555)
* Update remote write and remote read separately
* Add external labels to the remote write conf hash
* Add unit tests for remote storage lifecycle

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2019-05-17 10:29:49 +01:00
Lee Gaines f4486815c1 logs filesystem type on startup (#5558)
Signed-off-by: Lee Gaines <leetgaines@gmail.com>
2019-05-17 10:16:16 +01:00
Callum Styan bce663e1d9 Export the current segment index as a metic. (#601)
* Export the current segment index as a metic.

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2019-05-17 11:47:42 +03:00
Tariq Ibrahim c4b57ac4e2
fix minor issue in the <a> tag of rules.html
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
2019-05-16 13:00:35 -07:00
Frederic Branczyk 04f22700b7
Merge pull request #5571 from simonpasquier/extend-k8s-endpoint-metadata
discovery/kubernetes: add node name and hostname to endpoints
2019-05-16 20:19:29 +02:00
Samuel Alfageme 425b07f3c4 Updated the 'consistency-modes' consul.io/api link to point to its new location (#5572)
Ref: 626392eb62

Signed-off-by: Samuel Alfageme <samuel@alfage.me>
2019-05-16 15:52:35 +01:00
Krasi Georgiev 96a87845cc
fix wal panic when page flush fails. (#582)
* fix wal panic when page flush fails.

New records should be added to the page only when the last flush
succeeded. Otherwise the page would be full and panics when trying to
add a new record.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-05-16 16:40:43 +03:00
Brian Brazil 30d0ea59d7 Don't crash on an unknown tombstone ref. (#604)
Fixes https://github.com/prometheus/prometheus/issues/5562

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-05-16 16:36:44 +03:00
Simon Pasquier 3441ecdea1 discovery/kubernetes: add node name and hostname to endpoints
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-16 10:49:13 +02:00
Björn Rabenstein 0a34399611 Fix minor punctuation and language issues in flag doc strings (#5568)
This is mostly to create consistency, not because the one or the other
way would be wrong. A few actual corrections are also included.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-15 16:59:06 +02:00
PrometheusBot 63d9c2ab18 makefile: update Makefile.common with newer version (#603)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-05-15 10:15:39 +03:00
pbhudiaBAE 43953b105b Sorting alerts by group name in /alerts (#5448)
* Working group name

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Working categorised by group name

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Changed group sorting in web

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Fixed group sorting and comments

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Fixed group sorting and comments with gofmt

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Added file and group name

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* reverted back to full path to yml file

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>
2019-05-14 23:14:27 +02:00
Simon Pasquier 20eb23e0ca
Makefile.common: use v0.4.0 of promu (#5559)
* Makefile.common: use v0.4.0 of promu

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

* Remove installation of github-release

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-14 14:49:09 +02:00
Brian Brazil 89a90fe96c
Simplify mergedPostings.Seek (#595)
The current implementation leads to very slow behaviour when there's
many lists, this no worse than n log k, where k is the number of posting
lists.

Adjust benchmark to catch this.

Remove flattening of without lists, not needed anymore.

Benchmark versus 0.4.0 (used in Prometheus 2.7):
```
benchmark                                                            old ns/op      new ns/op      delta
BenchmarkHeadPostingForMatchers/n="1"-8                              189907976      188863880      -0.55%
BenchmarkHeadPostingForMatchers/n="1",j="foo"-8                      113950106      110791414      -2.77%
BenchmarkHeadPostingForMatchers/j="foo",n="1"-8                      104965646      102388760      -2.45%
BenchmarkHeadPostingForMatchers/n="1",j!="foo"-8                     138743592      104424250      -24.74%
BenchmarkHeadPostingForMatchers/i=~".*"-8                            5279594954     5206096267     -1.39%
BenchmarkHeadPostingForMatchers/i=~".+"-8                            8004610589     6184527719     -22.74%
BenchmarkHeadPostingForMatchers/i=~""-8                              2476042646     1003920432     -59.45%
BenchmarkHeadPostingForMatchers/i!=""-8                              7178244655     6059725323     -15.58%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-8              199342649      166642946      -16.40%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-8       215774683      167515095      -22.37%
BenchmarkHeadPostingForMatchers/n="1",i!=""-8                        2214714769     392943663      -82.26%
BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-8                2148727410     322289262      -85.00%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-8              2170658009     338458171      -84.41%
BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-8             235720135      70597905       -70.05%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-8       2190570590     343034307      -84.34%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-8     2373784439     387297908      -83.68%

benchmark                                                            old allocs     new allocs     delta
BenchmarkHeadPostingForMatchers/n="1"-8                              33             33             +0.00%
BenchmarkHeadPostingForMatchers/n="1",j="foo"-8                      33             33             +0.00%
BenchmarkHeadPostingForMatchers/j="foo",n="1"-8                      33             33             +0.00%
BenchmarkHeadPostingForMatchers/n="1",j!="foo"-8                     41             39             -4.88%
BenchmarkHeadPostingForMatchers/i=~".*"-8                            56             56             +0.00%
BenchmarkHeadPostingForMatchers/i=~".+"-8                            251577         100115         -60.21%
BenchmarkHeadPostingForMatchers/i=~""-8                              251123         100077         -60.15%
BenchmarkHeadPostingForMatchers/i!=""-8                              251525         100112         -60.20%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-8              42             39             -7.14%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-8       52             42             -19.23%
BenchmarkHeadPostingForMatchers/n="1",i!=""-8                        251069         100101         -60.13%
BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-8                251473         100101         -60.19%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-8              250914         100102         -60.11%
BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-8             30038          11181          -62.78%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-8       250813         100105         -60.09%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-8     281503         111260         -60.48%

benchmark                                                            old bytes     new bytes     delta
BenchmarkHeadPostingForMatchers/n="1"-8                              10887600      10887600      +0.00%
BenchmarkHeadPostingForMatchers/n="1",j="foo"-8                      5456416       5456416       +0.00%
BenchmarkHeadPostingForMatchers/j="foo",n="1"-8                      5456416       5456416       +0.00%
BenchmarkHeadPostingForMatchers/n="1",j!="foo"-8                     5456640       5456544       -0.00%
BenchmarkHeadPostingForMatchers/i=~".*"-8                            258254504     258254472     -0.00%
BenchmarkHeadPostingForMatchers/i=~".+"-8                            520126192     281554792     -45.87%
BenchmarkHeadPostingForMatchers/i=~""-8                              263446640     24908456      -90.55%
BenchmarkHeadPostingForMatchers/i!=""-8                              520121144     281553664     -45.87%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",j="foo"-8              7062448       7062272       -0.00%
BenchmarkHeadPostingForMatchers/n="1",i=~".*",i!="2",j="foo"-8       7063473       7062384       -0.02%
BenchmarkHeadPostingForMatchers/n="1",i!=""-8                        274325656     35793776      -86.95%
BenchmarkHeadPostingForMatchers/n="1",i!="",j="foo"-8                268926824     30362624      -88.71%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",j="foo"-8              268882992     30363000      -88.71%
BenchmarkHeadPostingForMatchers/n="1",i=~"1.+",j="foo"-8             33193401      4269304       -87.14%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!="2",j="foo"-8       268875024     30363096      -88.71%
BenchmarkHeadPostingForMatchers/n="1",i=~".+",i!~"2.*",j="foo"-8     300589656     33099784      -88.99%
```

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-05-13 10:51:07 +01:00
Brian Brazil 36dbf042e3
Correctly handle {__name__="a"} (#5552)
This can cause problems in alerts.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-05-11 00:46:15 +01:00
mrasu 3a7a743bc4 Consistent Content-Type for js and css (#5551)
Currently, When `/etc/mime.types` has a unusual mime type, web of prometheus uses the type and you may get unexpected result.
With this change, web returns consistent Content-Type header for static js and css files

To reproduce:
1. Add a type at the end of `/etc/mime` like `text/x-js js`
2. Run prometheus
3. Request js file like `http://localhost:9090/static/vendor/js/jquery.min.js`
4. You will see Content-Type of the response is `text/x-js` instead of `application/javascript`

Signed-off-by: mrasu <m.rasu.hitsuji@gmail.com>
2019-05-09 16:10:15 +01:00
Semyon Slepov 33f085a4d6 Remove bits about substring matching from the docs (#5549)
Substring matching for labels doesn't work anymore.
These parts are misleading, and contradict with the rest of the
documentation.

Signed-off-by: Semyon Slepov <slepovss@gmail.com>
2019-05-09 11:12:32 +01:00
Brian Brazil b98e818876
Add scrape_series_added per-scrape metric. (#5546)
This is an estimate of churn, with series being added to the cache being
considered churn. This will have both false positives (e.g. series
appearing and disappearing) and false negatives (e.g. series hit
sample_limit, but still created in head block), but should be generally
useful as-is.

Relevant docs live in another repo.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-05-08 22:24:00 +01:00
Björn Rabenstein c8939a67ba
Merge pull request #5545 from prometheus/beorn7/release
Volunteer beorn7 as 2.10 release shepherd
2019-05-08 15:00:08 +02:00
beorn7 bab26d9df8 Volunteer beorn7 as 2.10 release shepherd
I'm willing to do this under the condition that I can run an
experiment with never freezing master. See addition in the file.

I believe, this way is more consistent with how we handle the bugfix
releases after the final minor release is cut. It's at least worth a
try.

Signed-off-by: beorn7 <bjoern@rabenste.in>
2019-05-08 13:30:35 +02:00
Brian Brazil 6ac81cc7a9
Correctly handle empty labels. (#594)
Currently a time series with empty labels is not treated the same
as one with missing labels. Currently this can only come from
ALERTS&ALERT_FOR_STATE so it's unlikely anyone has actually hit it.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-05-07 11:00:16 +01:00
Goutham Veeramachaneni 2ae028114c
Add FromData function (again)! (#600)
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2019-05-06 19:17:26 +05:30
Yao Zengzeng dbd7a7400e some minor fixes: (#5535)
1. If alerts is empty after `relabelAlerts`, just return to avoid
subsequent unnecessary operations

2. minor fix in notifier's test case

3. minor fix in comment

Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>
2019-05-06 08:02:40 +01:00
PrometheusBot 4da65c46c9 makefile: update Makefile.common with newer version (#597)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2019-05-05 19:17:35 +03:00
Yao Zengzeng 5544cb252a fix some mistakes in comments (#5533)
Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>
2019-05-05 10:48:42 +01:00
Simon Pasquier 45506841e6
*: enable all default linters (#5504)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-03 15:11:28 +02:00
Simon Pasquier 9c69eec82a cmd/promtool: use log.NewNopLogger() (#5531)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-05-03 10:00:07 +01:00
zhulongcheng 3ccab17f5d docs: add label offset table and postings offset table (#593)
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-02 23:23:58 +03:00
Simon Pasquier 03b90b4645
web/ui: update to Bootstrap 4.3.1 (#5506)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-30 10:16:36 +02:00
Krasi Georgiev 5512826f13
make Close methods for the querier safe to call more than once. (#581)
* make Close methods for the querier safe to call more than once.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-04-30 10:17:07 +03:00
Frederic Branczyk c790d7658c
Merge pull request #5491 from metalmatze/rungroup
Use github.com/oklog/run not archived oklog/oklog
2019-04-29 16:22:16 +02:00
Frederic Branczyk 3cffd81035
Merge pull request #5520 from YaoZengzeng/service
The workqueue of service should be `service` other than `ingress`
2019-04-29 14:03:21 +02:00
YaoZengzeng 658b33808c The workqueue of service should be service other than ingress
Signed-off-by: YaoZengzeng <yaozengzeng@zju.edu.cn>
2019-04-29 17:21:35 +08:00
Frederic Branczyk f874555a0d
Merge pull request #5486 from tariq1890/update_kubernetes
update client-go,api,api-machinery and klog dependencies
2019-04-29 09:34:27 +02:00
zhulongcheng 19d402d154 cleanup tmp files (#570)
Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-04-26 11:27:36 +03:00
Julius Volz f04b1b5559
Clarify binary operator output label sets (#5512)
* Clarify binary operator output label sets

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Clarify binary op output labels further

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-04-25 14:10:22 +02:00
Krasi Georgiev 288f67efbf
fix some unchecked errors and remove unused vars. (#592)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-04-25 13:07:04 +03:00