Commit graph

7921 commits

Author SHA1 Message Date
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
Fabian Reinartz e19b648377 Merge pull request #155 from Gouthamve/level-log
Add levels to all log lines.
2017-10-02 16:34:49 +02:00
Fabian Reinartz 78df406dac Allocate and cache strings for persisted blocks
This change loads the full symbol table when we open a persisted block
and allocates a string for each. This ensures that strings retrieved
through the index can be used after the block was closed.
Before we backed the strings by the mmap'd byte regions which would
segfault in this case.

Also remove an inconsistency in the disk format and move both offset
tables to the end (breaking change).
2017-10-02 15:56:57 +02:00
Bas Harenslak e190c7c78d Add list blocks command to CLI 2017-10-01 22:18:50 +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
Goutham Veeramachaneni c521ac495f Merge pull request #152 from criteo-forks/master
Add db.Head() method
2017-09-28 18:10:53 +05:30
Goutham Veeramachaneni c35d3a65bd
Add levels to all log lines.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-09-28 12:49:34 +05:30
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
Tobias Schmidt f104a5dfc6 Merge pull request #3224 from alcortesm/config-simplify-returns
config: simplify some returns
2017-09-26 17:18:41 +02:00
Alberto Cortés bb3dad9cba config: simplify some returns 2017-09-26 16:57:56 +02:00
Alberto Cortés 2c9739162e utils/stats: remove dead code 2017-09-26 16:32:45 +02:00
beorn7 f51c97c7d4 Cut v1.7.2 2017-09-26 15:31:34 +02:00
Thibault Chataigner 0ff8f91ec8 Add db.Head() method
Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-09-25 16:45:24 +02:00
Tobias Schmidt 52ea748248 Merge pull request #3215 from prometheus/grobie/http-accept
Send a HTTP Accept header when scraping
2017-09-25 15:18:31 +02:00
Tobias Schmidt 40c278ee2d Send a HTTP Accept header when scraping 2017-09-25 14:51:29 +02:00
Goutham Veeramachaneni 87c01dd5fb Merge pull request #134 from criteo-forks/master
Expose `Blocks()` on DB
2017-09-25 17:41:25 +05:30
Björn Rabenstein 398fa4fd02 Merge pull request #3205 from prometheus/beorn7/ui
Make all rule links link to the "Console" tab rather than "Graph"
2017-09-21 19:53:48 +02:00
beorn7 c2e9a151ab Make all rule links link to the "Console" tab rather than "Graph"
Clicking on a rule, either the name or the expression, opens the rule
result (or the corresponding expression, repsectively) in the
expression browser. This should by default happen in the console tab,
as, more often than not, displaying it in the graph tab runs into a
timeout.
2017-09-21 18:28:00 +02:00
beorn7 16c95ae8e7 Merge branch 'release-1.7' 2017-09-21 18:27:12 +02:00
Fabian Reinartz 64c7932e85 Merge pull request #3202 from prometheus/beta5
*: release v2.0.0-beta.5
2017-09-21 18:20:29 +02:00
Fabian Reinartz c2166d48bb *: cut v2.0.0-beta.5 2017-09-21 16:18:49 +02:00
Fabian Reinartz 34f0af30cf vendor: update prometheus/tsdb 2017-09-21 15:27:21 +02:00
Fabian Reinartz 69f105f4f9 Merge pull request #151 from prometheus/waltrunc
Use boolean function instead of postings to drop WAL series
2017-09-21 15:04:43 +02:00
Fabian Reinartz 1e88ba06b4 Use boolean function instead of postings to drop WAL series
There is not guarantee or requirement for WAL writers to only add
series entries in increasing order of IDs. A postings list cannot look
back and thus unordered WAL entries would skip over IDs to not truncate
from the WAL.
We replace it with a simple boolean check function that does not require
order.
2017-09-21 13:31:01 +02:00
Thibault Chataigner 5ca18837e9 Make DB blocks list public.
This enable computing the first timestamp in the DB
only accessing public interfaces.

Signed-off-by: Thibault Chataigner <t.chataigner@criteo.com>
2017-09-21 11:56:12 +02:00
Fabian Reinartz 254ec433ee Merge branch 'dev-2.0' of github.com:prometheus/prometheus into dev-2.0 2017-09-21 09:55:17 +02:00
Fabian Reinartz 249d69b513 Merge pull request #3186 from prometheus/startweb
web: start web handler while TSDB is starting up
2017-09-21 09:53:03 +02:00
Fabian Reinartz 5fa1c993b9 Merge pull request #150 from prometheus/postingssort
Ensure postings are always sorted
2017-09-21 09:37:31 +02:00
Fabian Reinartz 6ee254e353 Ensure postings are always sorted
IDs for new series are handed out before the postings are locked. Thus
series are not indexed in order of their IDs, which could result in only
partially sorted postings list.
Iterating over those silently skipped elements as the sort invariant was
violated.
2017-09-21 09:38:18 +02:00