Commit graph

5460 commits

Author SHA1 Message Date
Frederic Branczyk f9c93b3686
Merge pull request #4905 from simonpasquier/cherrypick-4840
Cherrypick 4840
2018-11-26 10:35:02 +01:00
David Coles 1591ebf985 ui: Fix hover when metric has null value. (#4906)
When a metric has a null value, number formatters like
`humanizeNoSmallPrefix` will throw "Uncaught TypeError: Cannot read
property 'toPrecision' of null".

This is fixed by explicitly checking for `null` and returning the string
"null".

Note: This is usually not seen as rickshaw doesn't show annotations for
null values, but still calls the formatter.

Signed-off-by: David Coles <coles.david@gmail.com>
2018-11-25 14:16:48 +08:00
Fabian Reinartz a9803e9ecb Correctly skip mismatching targets
Signed-off-by: Fabian Reinartz <freinartz@google.com>
2018-11-23 17:10:31 +01:00
Krasi Georgiev 080e6ed31a
collect cpu and trace profiles with the promtool debug command (#4897)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-11-23 17:57:31 +02:00
Daniele Sluijters f25a6baedb remote: Set User-Agent header in requests (#4891)
Currently Prometheus requests show up with a UA of Go-http-client/1.1
which isn't super helpful. Though the X-Prometheus-Remote-* headers
exist they need to be explicitly configured when logging the request in
order to be able to deduce this is a request originating from
Prometheus. By setting the header we remove this ambiguity and make
default server logs just a bit more useful.

This also updates a few other places to consistently capitalize the 'P'
in the user agent, as well as ensure we set a UA to begin with.

Signed-off-by: Daniele Sluijters <daenney@users.noreply.github.com>
2018-11-23 22:49:49 +08:00
Alex Yu 5dcce32ef8 update promlog to latest version (#4876)
* update promlog to latest version

Signed-off-by: Alex Yu <yu.alex96@gmail.com>

* Update api tests, fix main setup

Signed-off-by: Alex Yu <yu.alex96@gmail.com>

* tidy go.sum

Signed-off-by: Alex Yu <yu.alex96@gmail.com>

* revendor prometheus/common

Signed-off-by: Alex Yu <yu.alex96@gmail.com>

* only initialize config; use kingpin for remote_storage_adapter

Signed-off-by: Alex Yu <yu.alex96@gmail.com>

* actually parse the flags

Signed-off-by: Alex Yu <yu.alex96@gmail.com>

* clean up imports

Signed-off-by: Alex Yu <yu.alex96@gmail.com>
2018-11-23 14:22:40 +01:00
Wei Guo 996fd958ac fix deadlock in scrape manager (#4894)
Scrape manager will fall in deadlock when we reload configs frequently.
2018-11-23 11:23:55 +02:00
Ganesh Vernekar cfb3769274 Lazily load samples for unit testing (#4851)
* Lazily load samples for unit testing

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

* cleanup

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-11-22 14:21:38 +05:30
arugaki b98a5acb57 fix buf redeclared in scrapeloop (#4873)
* buf Has been declared in scrape.go in line 785, I think it is unnecessary to declare a new variable again here.

Signed-off-by: arugakiWei <arugaki.wei@daocloud.io>

* delete the buf in line 785 because  it is never used.

Signed-off-by: arugakiWei <arugaki.wei@daocloud.io>
2018-11-22 12:13:52 +08:00
Krasi Georgiev bd100182b2
added tsdb/head mint maxt metrics (#4888)
added the head metrics with the correct suffix.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-11-21 12:57:32 +02:00
achiuBAE a9050c45f6 Allow setting the Prometheus instance document title through a flag. (#4841)
* web: added ability to set page title through flag.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* Reformatted variable names and Flag description for readability.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* assets_vfsdata.go

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* Flag name changed from web.ui-title to web.page-title

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* make assets

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
2018-11-21 12:45:06 +08:00
Simon Pasquier 87abb279e4
web: log stack traces on panic (#4221)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-20 14:25:03 +01:00
Julius Volz a8b8a8d5df
Fix .PHONE -> .PHONY typo in Makefile.common (#4886)
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-11-20 17:17:48 +08:00
Sylvain Rabot 1fd3b33dcd Prevent Azure SD panic (fix #4779) (#4867)
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2018-11-19 12:23:12 +00:00
Simon Pasquier ed19373a78
*: remove use of golang.org/x/net/context (#4869)
* *: remove use of golang.org/x/net/context

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

* scrape: fix TestTargetScrapeScrapeCancel

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-19 12:31:16 +01:00
Ganesh Vernekar ca93fd544b /api/v1/labels endpoint for getting all label names (#4835)
* vendor: update tsdb

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

* /api/v1/labels endpoint

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

* regex matchers for API

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

* Add docs

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

* Matchers behaving as OR

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

* Removed the matchers

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

* vendor: update tsdb using go mod

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

* vendor update: tsdb

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

* Added LabelNames() to storage.Querier

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

* Test for api.labelNames

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

* Nits

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-11-19 15:51:14 +05:30
Benji Visser 11b336e3ca Migrate all Docker image references to Docker Hub (#4864)
Signed-off-by: noqcks <benny@noqcks.io>
2018-11-16 11:26:10 +00:00
Junyu Wang 2f93fa6292 Included default flags into Dockerfile entrypoint (#4796)
* included default flags into Dockerfile entrypoint

Signed-off-by: Junyu Wang <junyuw@berkeley.edu>

* keeping style consistent

Co-Authored-By: DrakeW <junyuw@berkeley.edu>
Signed-off-by: Junyu Wang <junyuw@berkeley.edu>

* move prometheus.yml config into entrypoint & point to console template/libraries in etc/prometheus

Signed-off-by: Junyu Wang <junyuw@berkeley.edu>
2018-11-16 09:17:32 +01:00
Simon Pasquier 6fa8de132b
web/v1/api: add tests for admin actions (#4767)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-15 14:22:16 +01:00
Frederic Branczyk 5464c64853
Merge pull request #4802 from simonpasquier/go-modules
Switch to Go modules
2018-11-15 11:43:44 +01:00
stuart nelson 6a69471bc2
[promtool] Support writing output as json (#4848)
* Support writing output as json

Oftentimes I'll want to execute something based on
the output from promtool, and supporting json
makes it easy to pull out values with a supporting
tool such as jq.

Signed-off-by: stuart nelson <stuartnelson3@gmail.com>
2018-11-14 18:40:07 +01:00
Frederic Branczyk b82f930238
Merge pull request #4865 from squat/buffersignals
cmd/prometheus: buffer signal chans
2018-11-14 16:32:23 +01:00
Goutham Veeramachaneni d4b348a7b1
Merge pull request #4866 from gouthamve/api-compat
web(api): Make query and range api errors match
2018-11-14 13:26:07 +01:00
Goutham Veeramachaneni 7acedbce64
web(api): Make query and range api errors match
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-11-14 15:25:54 +05:30
Goutham Veeramachaneni 1f053f897b
Merge pull request #4628 from bboreham/fix-storage-error
Make ErrStorage a concrete type not an interface
2018-11-14 10:39:16 +01:00
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
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
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 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