Commit graph

7154 commits

Author SHA1 Message Date
Simon Pasquier e858c0826c Fix innocuous typo in variable names
This change fixes the variable names holding the tsdb_head_max_time and
tsdb_head_min_time metrics. It is a cosmetic change to improve the
code readability as the metric values are taken from the correct
variables.
2017-10-09 12:24:53 +02: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
Fabian Reinartz d3682d701c wal: decode and process in separate threads. 2017-10-06 14:46:52 +02:00
Fabian Reinartz dc87103807 Merge pull request #166 from prometheus/batchpostings
Load postings in batch on startup
2017-10-06 14:41:23 +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
Fabian Reinartz 74b0336d06 Merge pull request #167 from simonpasquier/instrument-wal-corruptions
Instrument WAL corruptions
2017-10-06 14:16:41 +02:00
Simon Pasquier 3e17cd1621 Instrument WAL corruptions 2017-10-06 13:50:20 +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
Fabian Reinartz cd2e26b7fc Load postings in batch on startup
This allows to insert IDs to postings out of order until
a trigger function is called. This avoids the insertion sort we usually
do which can be very costly since WAL entries are more out of order than
regular adds.
2017-10-06 10:39:10 +02: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
Goutham Veeramachaneni 4a7c39d9d8 Merge pull request #160 from dim/fix/snapshot-test
Restore snapshot functionality
2017-10-05 12:57:10 +05:30
Fabian Reinartz 27f1b8aac3 Merge pull request #162 from BasPH/fsync-duration
Instrument WAL fsync
2017-10-05 08:18:36 +02:00
Bas Harenslak 5e1c258a98 Instrument WAL fsync 2017-10-04 22:17:02 +02:00
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 da565f975e Merge pull request #161 from prometheus/fileutil
Remove dependency on etcd/pkg/fileutil
2017-10-04 17:08:54 +05:30
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
Goutham Veeramachaneni 203012169a
snapshot: Remove truncation check to restore func.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-10-04 16:58:07 +05:30
Fabian Reinartz f04ec031eb compact: sync temporary directory 2017-10-04 12:22:09 +02:00
Fabian Reinartz 665d1fd451 Merge pull request #158 from prometheus/cachesym
Allocate and cache strings for persisted blocks
2017-10-04 12:19:50 +02:00
Fabian Reinartz bbe72dccb9 Remove dependency on etcd/pkg/fileutil 2017-10-04 10:23:41 +02:00
Dimitrij Denissenko c9fc2af6c0 Add test for snapshot 2017-10-03 13:06:26 +01:00
Goutham Veeramachaneni 3b7e71fee9 Merge pull request #159 from dim/fix/wal-flush
Use configurable WAL flush interval
2017-10-03 16:17:55 +05:30
Dimitrij Denissenko 83c984d9a3 Use configurable WAL flush inteval 2017-10-03 11:35:38 +01:00
Bas Harenslak a41dad30fb Move printing db.blocks to main.go 2017-10-02 22:48:47 +02:00
Bas Harenslak 9945a67bff Replace columnize by stdlib tabwriter 2017-10-02 22:29:51 +02:00
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