Commit graph

4449 commits

Author SHA1 Message Date
Julius Volz 33c1171b9c Don't add anchoring to exported Value matcher field
Instead, just make the anchoring part of the internal regex. This helps because
some users will want to read back the `Value` field and expect it to be the
same as the input value (e.g. some tests in Cortex), or use the value in
another context which is already expected to add its own anchoring, leading to
superfluous double anchoring (such as when we translate matchers into remote
read request matchers).
2017-10-10 10:10:21 -07:00
Fabian Reinartz 269b5cf936 Merge pull request #3245 from jlevesy/use-require-web
Imports benbjohnson/testing and use it in web package
2017-10-10 10:58:27 +02:00
Fabian Reinartz ea879df6aa Merge pull request #3265 from mathieui/better-cmdline-errors
Provide better errors messages in commandline
2017-10-10 10:53:30 +02:00
Brian Brazil 73dc96e7f5 Fix leak of ticker in remote storage queue manager. 2017-10-09 19:44:03 +01:00
Brian Brazil 5ee07b3b3a Update staticcheck ignores
Remove things that now longer apply, ignore new things
that are acceptable.
2017-10-09 19:44:03 +01:00
Brian Brazil cc5499fcad Only close after checking for err. 2017-10-09 19:44:03 +01:00
Brian Brazil 7158675aa8 Add back continue.
Accidentally removed in
15a931dbdb
2017-10-09 19:44:03 +01:00
Brian Brazil 1545842704 TrimPrefix removes a prefix, TrimLeft removes chars 2017-10-09 19:44:03 +01:00
Brian Brazil ee88f0d222 Ensure all values are used or _ 2017-10-09 19:44:03 +01:00
Brian Brazil 8740fcc657 Use panic in goroutine in test, not t.Fatalf 2017-10-09 19:44:03 +01:00
Mathieu Pasquet 38afa507bb Provide better errors messages in commandline
Instead or only printing the help message, which is not always helpful.
For example, when upgrading from prometheus v1, the retention time value
format has changed and now only accepts one unit (e.g. "15d") where it
previously allowed more complex strings (e.g. "360h0m0s").

This commit provides the error message as an explanation for the parsing
failure.
2017-10-09 16:25:50 +02:00
Brian Brazil 37ec2d5283 Fix off by one error in concreteSeriesSet (#3262) 2017-10-09 13:37:58 +01:00
Fabian Reinartz abf7c975c9 Merge branch 'master' into dev-2.0 2017-10-07 13:37:21 +02:00
Björn Rabenstein 3569eef8b1 Merge pull request #3260 from prometheus/beorn7/release
Cut v1.8.0
2017-10-07 00:08:01 +02:00
beorn7 5829e4880d Cut v1.8.0 2017-10-06 22:13:36 +02:00
Björn Rabenstein 6bfc8f094c Merge pull request #3259 from prometheus/beorn7/web
Only respond to API requests once the server is ready
2017-10-06 18:41:11 +02:00
beorn7 f20e6a0ae4 Only respond to API requests once the server is ready 2017-10-06 17:20:20 +02:00
Björn Rabenstein 5fad671af9 Merge pull request #3257 from prometheus/beorn7/storage2
Avoid blocking in the logThrottling loop
2017-10-06 14:55:16 +02:00
beorn7 2fad91d25a Avoid blocking in the logThrottling loop
The timer semantics is really hard. The simple pattern as given in the
godoc for the time package assumes we are not elsewhere consuming from
the timer's channel. However, exactly that can happen here with the
right sequence of events. Thus, we have to drain the channel only if
it has something to drain.
2017-10-06 14:19:30 +02:00
Björn Rabenstein a5412cfc59 Merge pull request #3252 from LK4D4/proper_reset
[storage/local] fix timer.Reset usage
2017-10-06 13:31:07 +02:00
Jack Neely 128b31d058 Log failure to send NaN values to remote store as Debug (#3235)
This was a warning and can be a frequent occurrence.  Let's not fill up
logs unless we are asked to.
2017-10-06 11:22:55 +01:00
Marc Sluiter 6a633eece1 Added go-conntrack for monitoring http connections (#3241)
Added metrics for in- and outgoing traffic with go-conntrack.
2017-10-06 11:22:19 +01:00
Alexander Morozov 7e814ada72 [storage/local] fix timer.Reset usage
According to https://golang.org/pkg/time/#Timer.Reset you must not rely
on a returned value from Reset.

Signed-off-by: Alexander Morozov <lk4d4math@gmail.com>
2017-10-05 15:48:03 -07:00
Julien Levesy 26a067b23d use testutil assertion helpers in web package testsuite 2017-10-05 22:40:10 +02:00
Julien Levesy 332910d02d import assertion helpers in testutil 2017-10-05 22:22:40 +02:00
Goutham Veeramachaneni 012e52e3f9 Merge pull request #3248 from Gouthamve/release-rc1
*: release v2.0.0-rc.0
2017-10-05 20:07:14 +05:30
Goutham Veeramachaneni 7779d34877
*: release v2.0.0-rc.0
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-10-05 19:45:21 +05:30
Fabian Reinartz 748d392a7a vendor: remove unused dependencies 2017-10-05 15:08:24 +02:00
Fabian Reinartz f52248269e vendor: update prometheus/tsdb 2017-10-05 14:38:39 +02:00
Fabian Reinartz 7a3261aa99 Merge pull request #3240 from Gouthamve/fix-admin-api
web/api: Fix typo which broke the 2.0 admin APIs.
2017-10-05 14:33:12 +02:00
Fabian Reinartz 46dc7e356a Merge pull request #3243 from prometheus/mergemaster
Merge master into dev-2.0
2017-10-05 14:32:52 +02:00
Brian Brazil 99905f82a6 Remove keep_common modifier.
See #3060
2017-10-05 13:27:48 +01:00
Brian Brazil b2ac3d2d86 Remove count_scalar and drop_common_labels.
For #3060
2017-10-05 13:27:48 +01:00
Brian Brazil 67274f0794 Remove 4 interval staleness heuristic. (#3244)
This means that if there is no stale marker, only the usual staleness
delta (5m) applies.

It has occured to me that there is an oddity in the heurestic. It works
fine as long as you have 2 points within the last 5m, but breaks down
when the time window advances to the point where you have just 1 point.

Consider you had points at t=0 and t=10. With the heurestic it goes stale
at t=51, up until t=300. However from t=301 until t=310 we only
see the t=10 point and the series comes back to life. That is not
desirable.

I don't see a way to keep this form of heurestic working given this
issue, so thus I'm removing it.
2017-10-05 12:55:14 +01:00
Bryan Boreham a03193232a Don't disable HTTP keep-alives for remote storage connections. (#3173)
Removes configurability introduced in #3160 in favour of hard-coding,
per advice from @brian-brazil.
2017-10-05 12:32:24 +01:00
Fabian Reinartz 2d0b8e8b94 Merge branch 'master' into dev-2.0 2017-10-05 13:09:18 +02:00
Goutham Veeramachaneni 35aaa2002d
web/api: Add tests for v2 admin API
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-10-05 15:25:09 +05:30
Julius Volz f7e8348a88 Re-add contexts to storage.Storage.Querier() (#3230)
* Re-add contexts to storage.Storage.Querier()

These are needed when replacing the storage by a multi-tenant
implementation where the tenant is stored in the context.

The 1.x query interfaces already had contexts, but they got lost in 2.x.

* Convert promql.Engine to use native contexts
2017-10-04 21:04:15 +02:00
Tobias Schmidt 9c475b95db Merge pull request #3199 from pgier/remove-go-validator
cmd/prometheus: remove govalidator for url validation
2017-10-04 18:37:44 +02:00
Paul Gier 08af129b4d cmd/prometheus: don't allow quotes at beginning or end of url
This prevents accidental copy/paste error where a the web.external-url
or alertmanager.url params could have an extra set of quotes.
See also: https://github.com/prometheus/prometheus/issues/1229
2017-10-04 10:10:02 -05:00
Paul Gier f79b55d057 cmd/prometheus: remove govalidator for url validation
The usage of govalidator is redundant with the call to url.Parse for
url validation. Removing it has the following benefits:

 - The explicit error message is displayed instead of just a generic
   valid/invalid message
 - Slightly smaller code with one fewer external dependency
 - Speed improvement by removing duplicate call to url.Parse (inside
   govalidator.IsURL()
 - Resolves issue #2717

The only potential drawback of removing govalidator is that certain
URLs will be considered valid which were previously invalid. For example:

 - URLs with hostnames that start and/or end with an underscore (http://_example.com_)
 - URLs with hostnames that contain some special characters (http://foo&*bar.org)

These are valid URIs according to RFC 3986 and valid domain names per RFC 2181,
however they are not valid hostnames per RFC 952.
2017-10-04 10:08:34 -05:00
Goutham Veeramachaneni d70f850a18
web/api: Fix typo which broke the 2.0 admin APIs.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-10-04 17:02:32 +05:30
Fabian Reinartz c4270fdbf4 Merge pull request #3229 from krasi-georgiev/update-go-stack
vendor: update go-stack to fix sigpanic when debugging with delve
2017-10-02 16:57:04 +02:00
Krasi Georgiev 3c17e51391 vendor: update go-stack to fix sigpanic when debugging with delve
Signed-off-by: Krasi Georgiev <krasi.root@gmail.com>
2017-09-29 15:04:58 +03:00
Tom Wilkie 639d5c6f98 Merge pull request #3023 from tomwilkie/2945-remote-read-server
Implement remote read server in Prometheus.
2017-09-28 17:19:37 +01:00
beorn7 f1d4558469 Merge branch 'release-1.7' 2017-09-28 16:46:33 +02:00
Björn Rabenstein 2e8092aec9 Merge pull request #3177 from prometheus/beorn7/release2
Move to Go1.9
2017-09-28 16:25:11 +02:00
beorn7 bea12d4be1 Merge branch 'release-1.7' 2017-09-26 17:46:56 +02:00
Björn Rabenstein 22eadbe635 Merge pull request #3222 from prometheus/beorn7/release
Cut v1.7.2
2017-09-26 17:41:38 +02:00
Tobias Schmidt e8ce37ad0d Merge pull request #3223 from alcortesm/dead-code-at-stats
util/stats: remove dead code
2017-09-26 17:39:53 +02:00