Commit graph

4982 commits

Author SHA1 Message Date
Erdem Agaoglu 8809735d7f Setting User-Agent header (#2447) 2017-02-28 09:59:33 -04:00
Fabian Reinartz 097a2c1e59 vendor: re-vendor storage 2017-02-28 09:34:30 +01:00
Fabian Reinartz 4397b4d508 *: pass Prometheus registry into storage 2017-02-28 09:33:14 +01:00
Julius Volz 07491c9f1b Merge pull request #2452 from prometheus/swappable-post
notifier: Allow swapping out HTTP Doer
2017-02-27 22:15:24 +01:00
Julius Volz f152ac5e23 notifier: Allow swapping out HTTP Doer
We need to be able to modify the HTTP POST in Weave Cortex to add
multitenancy information to a notification. Since we only really need a
special header in the end, the other option would be to just allow
passing in headers to the notifier. But swapping out the whole Doer is
more general and allows others to swap out the network-talky bits of the
notifier for their own use. Doing this via contexts here wouldn't work
well, due to the decoupled flow of data in the notifier.

There was no existing interface containing the ctxhttp.Post() or
ctxhttp.Do() methods, so I settled on just using Do() as a swappable
function directly (and with a more minimal signature than Post).
2017-02-27 20:36:22 +01:00
Tom Wilkie 1ab893c6ec Limit 'discarding sample' logs to 1 every 10s (#2446)
* Limit 'discarding sample' logs to 1 every 10s

* Include the vendored library

* Review feedback
2017-02-23 19:20:39 +01:00
Julius Volz 16bd5c8ebe Merge pull request #2423 from prometheus/multiple-remote-writers
Re-add multiple remote writers
2017-02-23 09:48:40 +01:00
Fabian Reinartz cc0ff26f1f retrieval: handle GZIP compression ourselves
The automatic GZIP handling of net/http does not preserve
buffers across requests and thus generates a lot of garbage.
We handle GZIP ourselves to circumvent this.t
2017-02-22 13:25:25 +01:00
Julius Volz 2f39dbc8b3 Rename StorageQueueManager -> QueueManager 2017-02-21 21:45:43 +01:00
Julius Volz e9476b35d5 Re-add multiple remote writers
Each remote write endpoint gets its own set of relabeling rules.

This is based on the (yet-to-be-merged)
https://github.com/prometheus/prometheus/pull/2419, which removes legacy
remote write implementations.
2017-02-20 13:23:12 +01:00
Julius Volz a6d81a9f88 Update vendoring for github.com/prometheus/common/model 2017-02-20 13:23:12 +01:00
Björn Rabenstein 8cd3be5c5f Merge pull request #2433 from prometheus/beorn7/meta
Replace AUTHORS.md by an updated MAINTAINERS.md
2017-02-20 11:46:17 +01:00
beorn7 a1596f9c79 Replace AUTHORS.md by an updated MAINTAINERS.md 2017-02-20 11:45:22 +01:00
Fabian Reinartz 311e7b5069 storage/vendor: update to latest fabxc/tsdb 2017-02-20 11:11:44 +01:00
Derek Marcotte 74a3b1051a Add rickshawGraph proerty to the Graph object. (#2438)
Add rickshawGraph property to the Graph object.

This allows further changes to be made to the graph, for example,
annotations.
2017-02-18 10:03:32 +00:00
Björn Rabenstein 089dc1076b Merge pull request #2435 from jmeulemans/open-chunks-gauge
Adding gauge for number of open head chunks.
2017-02-17 16:02:06 +01:00
Jeremy Meulemans 025c828976 Changed to open_head_chunks to address review.
Now incrementing numHeadChunks directly.
2017-02-17 07:10:13 -06:00
Frederic Branczyk e14caf83e7 Merge pull request #2434 from stephen-soltesz/master
Fix kubernetes host:port relabel regex.
2017-02-17 10:51:05 +00:00
Jeremy Meulemans 074050b8c0 Updating for failed codeclimate check. 2017-02-16 18:04:28 -06:00
Jeremy Meulemans f70b52d0b6 Adding gauge for number of open head chunks.
Fixes #1710
2017-02-16 17:56:45 -06:00
Stephen Soltesz 3f29324e04 Fix kubernetes host:port relabel regex.
This change corrects a bug introduced by PR
https://github.com/prometheus/prometheus/pull/2427

The regex uses three groups: the hostname, an optional port, and the
prefered port from a kubernetes annotation.

Previously, the second group should have been ignored if a :port was not
present in the input. However, making the port group optional with the
"?" had the unintended side-effect of allowing the hostname regex "(.+)"
to match greedily, which included the ":port" patterns up to the ";"
separating the hostname from the kubernetes port annotation.

This change updates the regex for the hostname to match any non-":"
characters. This forces the regex to stop if a ":port" is present and
allow the second group to match the optional port.
2017-02-16 14:46:04 -05:00
Tobias Schmidt 0436e982cb Merge pull request #2427 from stephen-soltesz/master
Kubernetes port annotations - match addresses with or without declared ports
2017-02-14 22:45:30 -05:00
Stephen Soltesz 0b1790ee44 Match addresses with or without declared ports.
This change updates port relabeling for pod and service discovery so the
relabeling regex matches addresses with or without declared ports. As
well, this change uses a consistent style in the replacement pattern
for the two expressions.

Previously, for both services or pods that did not have declared ports, the
relabel config regex would fail to match:

    __meta_kubernetes_service_annotation_prometheus_io_port
    regex: (.+)(?::\d+);(\d+)

    __meta_kubernetes_pod_annotation_prometheus_io_port
    regex: (.+):(?:\d+);(\d+)

Both regexes expected a <host>:<port> pattern.

The new regex matches addresses with or without declared ports by making
the :<port> pattern optional.

    __meta_kubernetes_service_annotation_prometheus_io_port
    __meta_kubernetes_pod_annotation_prometheus_io_port
    regex: (.+)(?::\d+)?;(\d+)
2017-02-14 20:12:38 -05:00
Björn Rabenstein a37d39c463 Merge pull request #2425 from prometheus/beorn7/vendoring
vendoring: Do not ignore appengine build tags
2017-02-14 22:14:27 +01:00
Julius Volz 980586d183 Merge pull request #2419 from prometheus/remove-legacy-remotes
Remove legacy remote storage implementations
2017-02-14 18:35:39 +01:00
beorn7 b4ce5ca925 vendoring: Do not ignore appengine build tags
For weird reasons, this excluded github.com/miekg/dns/udp_other.go
from vendoring.
2017-02-14 18:32:07 +01:00
Julius Volz beb3c4b389 Remove legacy remote storage implementations
This removes legacy support for specific remote storage systems in favor
of only offering the generic remote write protocol. An example bridge
application that translates from the generic protocol to each of those
legacy backends is still provided at:

documentation/examples/remote_storage/remote_storage_bridge

See also https://github.com/prometheus/prometheus/issues/10

The next step in the plan is to re-add support for multiple remote
storages.
2017-02-14 17:52:05 +01:00
Björn Rabenstein 0f412e7e26 Merge pull request #2422 from levenlabs/nameList
discovery: Instead of looping over conf.Search, use NameList()
2017-02-14 17:48:06 +01:00
James Hartig 865f28bb15 discovery: Instead of looping over conf.Search, use NameList() 2017-02-13 15:48:51 -05:00
James Hartig e7ce10d4e5 vendoring: Update github.com/miekg/dns
This is needed to get the NameList function to get query names
2017-02-13 15:40:45 -05:00
Alex Somesan 18cd7246b5 Instrument query engine timings (#2418)
* Instrument query engine statistics
2017-02-13 16:45:00 +00:00
beorn7 e7c8a612de Merge branch 'release-1.5' 2017-02-10 15:45:54 +01:00
Björn Rabenstein bd1182d29f Merge pull request #2415 from prometheus/beorn7/release
Cut v1.5.2
2017-02-10 15:34:18 +01:00
beorn7 6c17d30688 Cut v1.5.2 2017-02-10 13:57:11 +01:00
beorn7 d3297e0686 build: Use Go1.7.4 in Travis 2017-02-10 13:05:32 +01:00
beorn7 abf1d6e413 storage: Fix typo in doc comment 2017-02-10 12:44:57 +01:00
Björn Rabenstein b4450f02bc Merge pull request #2414 from prometheus/beorn7/storage
storage: Fix chunkIndexToStartSeek calculation
2017-02-10 12:43:00 +01:00
beorn7 d771185a43 storage: Fix chunkIndexToStartSeek calculation
With a high enough shrink ratio and enough chunks to persist, the
cutoff point could be _outside_ of the file, which wreaks havoc in the
storage.
2017-02-10 11:42:59 +01:00
Björn Rabenstein 342f970e05 Merge pull request #2413 from prometheus/beorn7/storage
storage: Fix offset returned by dropAndPersistChunks
2017-02-09 15:54:52 +01:00
beorn7 73bd5e4dff Merge branch 'beorn7/storage' into beorn7/storage3 2017-02-09 14:44:10 +01:00
beorn7 46a0837816 storage: Fix offset returned by dropAndPersistChunks
This is another corner-case that was previously never exercised
because the rewriting of a series file was never prevented by the
shrink ratio.

Scenario: There is an existing series on disk, which is archived. If a
new sample comes in for that file, a new chunk in memory is created,
and the chunkDescsOffset is set to -1. If series maintenance happens
before the series has at least one chunk to persist _and_ an
insufficient chunks on disk is old enough for purging (so that the
shrink ratio kicks in), dropAndPersistChunks would return 0, but it
should return the chunk length of the series file.
2017-02-09 14:35:07 +01:00
beorn7 9d12204da5 Merge branch 'release-1.5' 2017-02-09 13:11:53 +01:00
Björn Rabenstein 0c688ab339 Merge pull request #2412 from prometheus/beorn7/storage
storage: One more persist error code path discovered
2017-02-09 13:09:41 +01:00
beorn7 bed4934224 storage: One more persist error code path discovered
Also, in that code path, set chunkDescsOffset to 0 rather than -1 in
case of "dropped more chunks from persistence than from memory" so
that no other weird things happen before the series is quarantined for
good.
2017-02-09 11:51:40 +01:00
beorn7 242d8edcb5 Merge branch 'release-1.5' 2017-02-08 17:28:09 +01:00
Björn Rabenstein eac9696a36 Merge pull request #2410 from prometheus/beorn7/storage
storage: writeMemorySeries needs to return true for quarantined series
2017-02-08 17:27:43 +01:00
beorn7 8c8baaa558 storage: writeMemorySeries needs to return true for quarantined series
This is another fallout of my bug hunt.
2017-02-08 16:28:56 +01:00
Mitsuhiro Tanda be8b1eb656 storage: optimize dropping chunks by using minShrinkRatio (#2397)
storage: prevent unnecessary chunk header reading if minShrinkRatio > 0
2017-02-07 17:33:54 +01:00
Fabian Reinartz f6dae7a5ba vendor: add fabx/tsdb 2017-02-07 03:42:02 -08:00
beorn7 85268a55c0 Merge branch 'release-1.5' 2017-02-07 12:10:40 +01:00