Commit graph

7132 commits

Author SHA1 Message Date
Björn Rabenstein df4bc3e407 Merge pull request #3170 from tomwilkie/1.7-2969-negative-shards
Prevent number of remote write shards from going negative.
2017-09-14 13:29:34 +02:00
Fabian Reinartz 1b80f631a8 Merge pull request #3172 from prometheus/cutbeta4
*: cut 2.0.0-beta.4
2017-09-14 13:20:26 +02:00
Fabian Reinartz a31e6522e4 *: cut 2.0.0-beta.4 2017-09-14 12:46:49 +02:00
Tom Wilkie f66f882d08 Merge pull request #3160 from bboreham/remote-keepalive
Re-enable http keepalive on remote storage
2017-09-14 08:23:43 +01:00
Tom Wilkie 4f8efdbd59 Prevent number of remote write shards from going negative.
This can happen in the situation where the system scales up the number of shards massively (to deal with some backlog), then scales it down again as the number of samples sent during the time period is less than the number received.
2017-09-14 08:07:40 +01:00
Fabian Reinartz 1121b9f7d4 retrieval: cache dropped series, mutate labels in place 2017-09-14 08:36:19 +02:00
Ben Kochie 1ab0bbb2c2 Merge pull request #3125 from prometheus/bjk/staticcheck
Enable statitcheck at build time.
2017-09-13 14:42:29 -07:00
Fabian Reinartz 643563068b Merge pull request #144 from Gouthamve/misc-
Expose NewIndexReader() and cleanups
2017-09-13 10:23:07 +02:00
Goutham Veeramachaneni 8919baef03
Expose NewIndexReader() and cleanups
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-09-13 13:47:20 +05:30
Fabian Reinartz e45bb1d328 Merge pull request #142 from krasi-georgiev/107-swap-cobra-with-kingpin
replaced cobra with kingpin for the tsdb cli tool
2017-09-12 19:28:35 +02:00
Björn Rabenstein 4d8e7ca185 Merge pull request #3159 from mattbostock/1.7_marathon_sd_cherrypick
Marathon SD: Set port index label
2017-09-12 18:53:40 +02:00
Fabian Reinartz 13f59329ab Merge pull request #3162 from prometheus/cutbeta3
*: cut 2.0.0-beta.3
2017-09-12 12:13:16 +02:00
Fabian Reinartz 7f300f27cb *: cut 2.0.0-beta.3 2017-09-12 12:13:31 +02:00
Fabian Reinartz 2b2e214857 vendor: update prometheus/tsdb 2017-09-12 12:01:54 +02:00
Fabian Reinartz 63c246f924 Merge branch 'dev-2.0' of github.com:prometheus/prometheus into dev-2.0 2017-09-12 12:01:09 +02:00
Matt Bostock e758260986 Marathon SD: Set port index label
The changes [1][] to Marathon service discovery to support multiple
ports mean that Prometheus now attempts to scrape all ports belonging to
a Marathon service.

You can use port definition or port mapping labels to filter out which
ports to scrape but that requires service owners to update their
Marathon configuration.

To allow for a smoother migration path, add a
`__meta_marathon_port_index` label, whose value is set to the port's
sequential index integer. For example, PORT0 has the value `0`, PORT1
has the value `1`, and so on.

This allows you to support scraping both the first available port (the
previous behaviour) in addition to ports with a `metrics` label.

For example, here's the relabel configuration we might use with
this patch:

    - action: keep
      source_labels: ['__meta_marathon_port_definition_label_metrics', '__meta_marathon_port_mapping_label_metrics', '__meta_marathon_port_index']
      # Keep if port mapping or definition has a 'metrics' label with any
      # non-empty value, or if no 'metrics' port label exists but this is the
      # service's first available port
      regex: ([^;]+;;[^;]+|;[^;]+;[^;]+|;;0)

This assumes that the Marathon API returns the ports in sorted order
(matching PORT0, PORT1, etc), which it appears that it does.

[1]: https://github.com/prometheus/prometheus/pull/2506
2017-09-11 13:40:51 +01:00
Bryan Boreham 9d6b945e41 Default HTTP keep-alive ON for remote read/write 2017-09-11 09:48:30 +00:00
Bryan Boreham e0a4d18301 Allow http keep-alive setting to be overridden in config 2017-09-11 09:07:14 +00:00
Fabian Reinartz e746282772 Merge branch 'master' into dev-2.0 2017-09-11 10:55:19 +02:00
Fabian Reinartz 3870ec285c Merge pull request #140 from prometheus/locks
Fix various races
2017-09-11 10:41:33 +02:00
Fabian Reinartz 3d8be398d6 Merge branch 'locks' of github.com:prometheus/tsdb into locks 2017-09-11 10:39:55 +02:00
Fabian Reinartz 24362567b9 Fix test flakes 2017-09-11 10:33:17 +02:00
Fabian Reinartz e6d819952b Merge pull request #3145 from prometheus/mempool
Use memory pools for scrape buffer
2017-09-11 10:23:19 +02:00
Fabian Reinartz 30d29b889c Merge pull request #141 from prometheus/dectmpstr
Fixup allocation regression during compaction
2017-09-11 10:06:49 +02:00
Fabian Reinartz bfe75cec35 Merge pull request #138 from Gouthamve/chunk-compress
Compress the series chunk details in index.
2017-09-11 10:01:42 +02:00
Krasi Georgiev 92d0414993 replaced cobra with kingpin
Signed-off-by: Krasi Georgiev <krasi.root@gmail.com>
2017-09-10 12:35:02 +03:00
Tobias Schmidt 8bee283f8a Merge pull request #2895 from jamiemoore/ec2_discovery_rolearn
Add the ability to assume a role for ec2 discovery
2017-09-09 19:20:47 +02:00
Jamie Moore 7a135e0a1b Add the ability to assume a role for ec2 discovery 2017-09-10 00:36:43 +10:00
Fabian Reinartz b09d90c79c Add decoding method to retrieve unsafe strings
When decoding data from mmaped blocks, we would like to retrieve
a string backed by the mmaped region. As the underlying byte slice
never changes, this is safe.
2017-09-08 18:41:43 +02:00
Fabian Reinartz f904cd385f Do not build a superflous 'all' postings 2017-09-08 18:41:43 +02:00
Fabian Reinartz 6892fc6dcb Finish old WAL segment async, default to no fsync
We were still fsyncing while holding the write lock when we cut a new
segment. Given we cannot do anything but logging errors, we might just
as well complete segments asynchronously.

There's not realistic use case where one would fsync after every WAL
entry, thus make the default of a flush interval of 0 to never fsync
which is a much more likely use case.
2017-09-08 18:41:12 +02:00
Fabian Reinartz d21f149745 *: migrate to go-kit/log 2017-09-08 22:01:51 +05:30
Goutham Veeramachaneni afaf12fe45
Compress the series chunk details in index.
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-09-08 20:25:19 +05:30
Fabian Reinartz 9b4c3d4254 Merge pull request #3146 from prometheus/fixprofpath
web: fix profile paths
2017-09-08 14:19:46 +02:00
Fabian Reinartz 64c7c56df8 Merge pull request #3147 from dvrkps/patch-1
travis: add 1.x to go versions
2017-09-08 09:36:14 +02:00
Fabian Reinartz 1d5f85817d Fix various races 2017-09-08 08:48:19 +02:00
Fabian Reinartz c2916736be Re-use slices on deocding the WAL. Fix tests. 2017-09-08 08:17:01 +02:00
Davor Kapsa bb853abf24 travis: add 1.x to go versions 2017-09-07 17:24:02 +02:00
Fabian Reinartz 27bdddbf51 web: fix profile paths 2017-09-07 16:24:12 +02:00
Fabian Reinartz 5bed8af4cb retrieval: pool scrape buffers
This adds a bucketed buffer pool to the scrapers so we don't have to
allocate a new buffer on each scrape or hold it fixed to the scrape
loop.

The latter can consume significant amounts of unused memory, e.g. 4GB
when scraping 2MB /metrics from 2000 targets.
2017-09-07 14:43:21 +02:00
Fabian Reinartz d6f6ad67b3 pkg/pool: create bucketed memory pool package. 2017-09-07 14:34:05 +02:00
Fabian Reinartz a8887f46dc Merge branch 'dev-2.0' of github.com:prometheus/prometheus into dev-2.0 2017-09-07 14:15:12 +02:00
Fabian Reinartz 0efecea6d4 Adapt storage APIs to uint64 references 2017-09-07 14:14:41 +02:00
Fabian Reinartz a007eb2e1e vendor: update prometheus/tsdb to single head mode 2017-09-07 14:14:33 +02:00
Fabian Reinartz 6ab652e3dc Merge pull request #3144 from wgliang/master
should use time.Since instead of time.Now().Sub
2017-09-07 13:51:46 +02:00
Fabian Reinartz a0280cc489 Merge pull request #3142 from prometheus/fish/fix-k8s-ingress-type
k8s: Use versioned struct for ingress discovery
2017-09-07 13:51:20 +02:00
Fabian Reinartz 0db4c227b7 Fix min/max time handling and concurrent crc32 usage 2017-09-07 13:04:02 +02:00
wangguoliang 7e6c6020ff should use time.Since instead of time.Now().Sub
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 18:00:45 +08:00
Fabian Reinartz 970bffec8d Fix WAL errors and add tests for it 2017-09-07 10:58:34 +02:00
Fabian Reinartz 81222849bc Filter WAL data in Head, misc fixes 2017-09-06 16:20:37 +02:00