Commit graph

5669 commits

Author SHA1 Message Date
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
Björn Rabenstein c4686f7915 Merge pull request #2403 from prometheus/beorn7/release
Cut release 1.5.1
2017-02-07 11:54:26 +01:00
beorn7 eb6b95ac2e Cut release 1.5.1
Sadly, this is urgently required.
2017-02-07 10:55:01 +01:00
beorn7 0f3d37ca4c Merge branch 'release-1.5' 2017-02-07 00:22:40 +01:00
Björn Rabenstein 3e133a9312 Merge pull request #2400 from prometheus/beorn7/storage2
storage: Fix checkpointing of fully persisted memory series.
2017-02-07 00:21:14 +01:00
Fabian Reinartz e4f58d9860 Merge pull request #2401 from svend/kubernetes-config
Kubernetes SD: Fix namespace meta label in example config
2017-02-06 23:25:37 +01:00
Svend Sorensen 3a96d0e267 Kubernetes SD: Fix namespace meta label
Replace one more instance of `__meta_kubernetes_service_namespace` with
`__meta_kubernetes_namespace`.
2017-02-06 13:28:12 -08:00
beorn7 2363a90adc storage: Do not throw away fully persisted memory series in checkpointing 2017-02-06 17:39:59 +01:00
Fabian Reinartz ea3ba338dd main: add flags for new storage 2017-02-05 18:22:06 +01:00
Or Cohen 93d20d2d2b Improve fuzzy search
The fuzzy library didn't try to find a "best match", but settled on the
first fuzzy match that exists. This patch includes a modified version of
the fuzzy library, which recursivley tries on the rest of the search
string to find a better match. If found, returns that one.

Another small modification is that if a pattern fully matches, it
skips the lookup entirley and returns the highest score possible for
that match.
2017-02-05 17:38:05 +02:00
Or Cohen 81d37a04aa Fix autocomplete misses certain queries
For some of the queries, the fuzzy lookup was not filtering properly.
The problem is due to the "replace" beind made on the query itself. It
accidently removes only the first underscore. This patch changes it so
that it removes all of the whitespaces, letting the fuzzy algorithm do
its magic, also fixing this problem.

Originally, the underscore were replaced by a space for this specific
reason, to let the user type a space and have the lookup treat it as the
word break.

Fixes #2380
2017-02-05 16:20:52 +02:00
beorn7 244a65fb29 storage: Increase persist watermark before calling append
The append call may reuse cds, and thus change its len.
(In practice, this wouldn't happen as cds should have len==cap.
Still, the previous order of lines was problematic.)
2017-02-05 02:25:09 +01:00
beorn7 75282b27ba storage: Added checks for invariants 2017-02-04 23:40:22 +01:00
beorn7 31e9db7f0c storage: Simplify evictChunkDesc method 2017-02-04 22:29:37 +01:00