Commit graph

13544 commits

Author SHA1 Message Date
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
Fabian Reinartz afa084920c Use Castagnoli polynomial for CRC32s; cache them 2017-02-15 21:13:17 -08:00
Fabian Reinartz 9c7a88223e Add full encode/decode WAL cycle test 2017-02-14 21:55:50 -08: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
Fabian Reinartz 2c97428a79 Add basic WAL tests 2017-02-14 16:12:56 -08: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
Fabian Reinartz 84e8027a8e Close consumed WAL segments, verify checksums on read 2017-02-14 00:42:06 -08:00
Fabian Reinartz eeb03e97e2 Add headers and format flag for WAL segments 2017-02-14 00:24:53 -08:00
Fabian Reinartz 79944a5912 Break out WAL into segment files 2017-02-13 23:53:19 -08: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
Fabian Reinartz 987a90d149 Don't delete files if retention duration is 0 2017-02-11 11:49:17 -08: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
Fabian Reinartz 9c76624df2 Add initial retention cutoff 2017-02-09 17:54:26 -08: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
Fabian Reinartz f1435f2e2c Track appended samples properly in metric 2017-02-08 16:13:16 -08: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