Commit graph

7451 commits

Author SHA1 Message Date
Lucas Serven 70c8b2c63c
cmd/prometheus: buffer signal chans
According to the GoDoc for os.Signal [0]:

> Package signal will not block sending to c: the caller must ensure that
> c has sufficient buffer space to keep up with the expected signal rate.
> For a channel used for notification of just one signal value, a buffer
> of size 1 is sufficient.

[0] https://golang.org/pkg/os/signal/#Notify

Signed-off-by: Lucas Serven <lserven@gmail.com>
2018-11-14 10:33:28 +01:00
Simon Pasquier 181f07ef26
web: avoid proxy to connect to the local gRPC server (#4572)
By default the gRPC client of the REST API gateway relies on the
HTTP_PROXY variable to connect to the local gRPC server which isn't
desired as the server runs in the same process. This change uses a
custom dialer that connects directly to the server's address.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-13 14:42:23 +01:00
fengyuceNv 94fff219ab improve remote storage enqueue performance (#4772)
Signed-off-by: fyc <fyc22788@ly.com>
2018-11-13 12:19:05 +00:00
Brian Brazil 8edaa8ad4d
Fix goroutine leak in lexer/parser. (#4858)
When there was an error in the parser, the
lexer goroutine was left running.

Also make runtime panic test actually test things.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-11-12 18:47:13 +00:00
Simon Pasquier d89c01b065 web/ui: fix asset generation for Go modules installs
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 10:56:21 +01:00
Simon Pasquier bf9a1d3d15 *: fix assets generation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 10:38:29 +01:00
Simon Pasquier 5dce2f5853 Merge branch 'master' into go-modules
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 09:57:53 +01:00
Simon Pasquier 466a8d94fc Makefile: fix assets rule
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 09:56:36 +01:00
Ben Kochie b1e779d0ed
Use release binary of promu (#4843)
Download and extract a release binary of promu, rather than pull from
master.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-10 16:28:59 +01:00
Simon Pasquier a9ff66427b Makefile: add precheck target
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 17:14:37 +01:00
Simon Pasquier 46cdf0b674 vendor: fix k8s.io/client-go version
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 17:14:37 +01:00
Simon Pasquier 0a319b001a Update documentation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 15:01:15 +01:00
Alin Sinpalean 171fc4ab5d Limit the returned db.Querier to the requested time range (#351)
Limit the returned `db.Querier` to the requested time range. Preallocate the `baseChunkSeries.lset` and `baseChunkSeries.chks` slices to the previous series' slice sizes to avoid unnecessary grow slice reallocations.
2018-11-09 15:54:56 +02:00
Krasi Georgiev e4843938ba
add missing zero to tombstone magic number (#448)
add missing zero to tombstone magic number constant.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-11-09 13:37:02 +02:00
Simon Pasquier a60d2c152f Makefile.common: clean up
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 11:55:04 +01:00
Simon Pasquier e3cd3ab79a Merge branch 'master' into go-modules
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 11:42:12 +01:00
Simon Pasquier 5230e2730a
*: check that assets are up-to-date (#4731)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 11:31:36 +01:00
Simon Pasquier 7465118a2c
Fix errors in the vendor/ directory (#4781)
* vendor: fix revision for google.golang.org/grpc packages

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

* vendor: fix revision for google.golang.org/genproto/googleapis/rpc/status

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

* vendor: fix revision for github.com/petermattis/goid

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

* vendor: fix revision for github.com/davecgh/go-spew/spew

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

* vendor: fix revision for github.com/ghodss/yaml

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

* vendor: fix revision for github.com/golang/glog

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

* vendor: fix revision for github.com/google/gofuzz

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

* vendor: fix revision for github.com/pmezard/go-difflib/difflib

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

* vendor: fix revision for github.com/sasha-s/go-deadlock

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

* vendor: fix revision for gopkg.in/inf.v0

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

* vendor: remove unused packages from vendor.json

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

* vendor: commit vendor/ after running govendor sync

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 10:17:47 +01:00
Frederic Branczyk 12ab9bf792
Merge pull request #4829 from brancz/release-doc
Add RELEASE.md
2018-11-08 09:43:14 +01:00
Krasi Georgiev a9470dd8d5
few more comments to explain the WAL workflow (#430)
More comments for the WAL package.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-11-08 10:27:16 +02:00
Ganesh Vernekar 3a08a71d86 LabelNames() method to get all unique label names (#369)
* LabelNames() method to get all unique label names

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-11-07 17:52:41 +02:00
Ganesh Vernekar a95323c021 Add license headers to missing files (#447)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-11-06 20:19:42 +02:00
Frederic Branczyk bda9781ccd
Merge pull request #3839 from brancz/remove-old-alert-record
promql: Remove old and unused alerting/reconding syntax
2018-11-06 15:53:27 +01:00
Frederic Branczyk 3274a74595
Add RELEASE.md
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2018-11-06 15:47:26 +01:00
Frederic Branczyk 3287b9a4b8
Merge pull request #4579 from bwplotka/ensure-genproto-works
proto: Allow reproducible proto generation.
2018-11-06 15:46:56 +01:00
Bryan Boreham cf37e1feb4 Add __meta_kubernetes_pod_phase label in discovery (#4824)
This lets you add a relabel rule to drop scrapes for pods which are
not running.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2018-11-06 14:40:24 +00:00
Silvio Gissi 6100f160ad EC2 Platform meta label (#4663)
Set __meta_ec2_platform label with the instance platform string. Set to 'windows' on Windows servers and absent otherwise.


Signed-off-by: Silvio Gissi <silvio@gissilabs.com>
2018-11-06 14:39:48 +00:00
Mucahit Kurt 4a6c329d71 add alert template expanding failure metric (#4747)
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
2018-11-06 14:39:06 +00:00
Frederic Branczyk 67dc912ac8
Merge pull request #4828 from brancz/cherrypick-4826
Cherrypick 4826
2018-11-06 12:38:56 +01:00
Frederic Branczyk 742b071dd1
*: Cut v2.5.0
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2018-11-06 11:36:04 +01:00
Frederic Branczyk c2f32c99cf
Merge pull request #4826 from brancz/cut-2.5.0
*: Cut v2.5.0
2018-11-06 11:34:27 +01:00
Frederic Branczyk 98e4d8f6e4
*: Cut v2.5.0
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2018-11-06 09:20:09 +01:00
Brian Brazil c7e7fd355e Only send WAL read workers the samples they need.
Calculating the modulus in each worker was a hotspot,
and meant that you had more work to do the more cores you had.
This cuts CPU usage (on my 8 core, 4 real core machine) by
33%, and walltime by 3%

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-10-31 22:52:26 +00:00
Brian Brazil a64b0d51c4 Precalculate memSeries.head
This is read far more than it changes.
This cuts ~14% off walltme and ~27% off CPU for WAL reading.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-10-31 15:49:42 +00:00
Brian Brazil d8c8e4e6e4 Keep local cache of ids.
With the various goroutines running, the locking
in getByID is notable. This cuts cpu usage by ~25%
and walltime by ~20%.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-10-31 15:49:42 +00:00
Brian Brazil f0e79ec264 Actually reuse samples in loadWAL across records.
This cuts walltime by 2.5X and CPU by 2X

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-10-31 15:49:42 +00:00
Ye Ben 23a5f09085 fix a typo dont -> dont't (#438)
Signed-off-by: yeya24 <ben.ye@daocloud.io>
2018-10-31 13:49:57 +02:00
Frederic Branczyk bb81bac12d
Merge pull request #4810 from brancz/cherrypick-4806-4809
Cherrypick 4806 4809
2018-10-31 12:33:31 +01:00
Frederic Branczyk 6662b4fd9f
*: Cut v2.5.0-rc.2
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2018-10-31 11:28:06 +01:00
Simon Pasquier de459cb3f3
web: display job label in targets page
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-31 11:27:58 +01:00
Frederic Branczyk 4d4b5c9d12
Merge pull request #4809 from brancz/cut-2.5.0-rc.2
*: Cut v2.5.0-rc.2
2018-10-31 11:14:47 +01:00
Frederic Branczyk b76dd3513b
*: Cut v2.5.0-rc.2
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
2018-10-31 09:52:34 +01:00
Frederic Branczyk dbe8acce94
Merge pull request #4806 from simonpasquier/fix-targets-page
web: display job label in targets page
2018-10-31 08:34:09 +01:00
Simon Pasquier 147f2061d5 web: display job label in targets page
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-30 16:20:43 +01:00
Frederic Branczyk 68ea9840eb
Merge pull request #4800 from brancz/cherrypick-4794
cherrypick 4794
2018-10-30 10:05:32 +01:00
Krasi Georgiev ae91febcbb
Update the files format README.md (#437) 2018-10-29 19:51:47 +02:00
Simon Pasquier 4fc6e22067 Set GO111MODULE when running staticcheck
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier 5bd9010196 More updates for libraries
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier be68fb0f30 Update Makefile.common to support libraries
Specifically tsdb and client_golang that don't use vendoring.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00
Simon Pasquier 790876da60 go get honnef.co/go/tools/cmd/staticcheck in a temp dir
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-29 17:25:43 +01:00