Commit graph

7127 commits

Author SHA1 Message Date
Simon Pasquier b639fe140c
*: cut v2.6.1 (#5098)
* *: cut v2.6.1

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Move container change first.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Update VERSION

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-15 17:41:34 +01:00
Simon Pasquier 375ad1185c
*: bump gRPC dependencies (#5075)
* *: bump gRPC dependencies

This change updates the gRPC dependencies to more recent versions:

* github.com/gogo/protobuf => v1.2.0
* github.com/grpc-ecosystem/grpc-gateway => v1.6.3
* google.golang.org/grpc => v1.17.0

In addition scripts/genproto.sh leverages Go modules information instead of
hardcoding SHA1 commits. This ensures that the code is generated from
the exact same sources.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Run 'make proto' in CI

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Revert tabs -> spaces change

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix 'make proto' step

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* 'go get' grpc/protobuf dependencies

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Prepopulate cache with go mod download

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-15 15:32:05 +01:00
Daniel Lo Nigro edaa4835a2 Update WAL directory structure, and mention that the last three are always kept (#5096)
* Small tweaks to storage doc page

Signed-off-by: Daniel Lo Nigro <d@d.sb>
2019-01-15 10:32:29 +00:00
tommarute 9922c35a23 marathon-sd - use Tasks.Ports instead of PortDefinitions.Ports if RequirePorts is false (#5022) (#5026)
Signed-off-by: tommarute <tommarute@gmail.com>
2019-01-14 17:20:22 +00:00
naivewong bff5aa4d21 Missing the len of crc32 when calculating maxLen in WriteChunks (#494)
Signed-off-by: naivewong <867245430@qq.com>
2019-01-14 20:58:03 +05:30
Sylvain Rabot d9f4a8c95f sd: Fix stuck Azure service discovery (#5088)
Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2019-01-14 15:09:27 +00:00
Ye Ben a360aa3e86 change variable name metrics to labels (#496)
Signed-off-by: yeya24 <ben.ye@daocloud.io>
2019-01-14 11:44:32 +03:00
Vishnunarayan K I fd3ef6ba34 Add metric rule_group_rules_loaded to get the number of rules loaded (#5090)
Signed-off-by: Vishnunarayan K I <appukuttancr@gmail.com>
2019-01-13 14:28:07 +00:00
Bartek Płotka c065fa6957 Exposed helper methods for reading index bytes. (#492)
Changes:
* Make `NewReader` method useful. It was impossible to use it, because closer was always nil.
* ReadSymbols, TOC and ReadOffsetTable are not public functions (used by Thanos).
* decbufXXX are now functions.
* More verbose errors.
* Removed unused crc32 field.
* Some var name changes to make it more verbose:
  * symbols -> allocatedSymbols
  * symbolsSlice -> symbolsV1
  * symbols -> symbolsV2
  *
* Pre-calculate symbolsTableSize.
* Initialized symbols for Symbols() method with valid length.
* Added test for Symbol method.
* Made Decoder LookupSymbol method public. Kept Decode public as it is useful as helper from index package.

Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2019-01-11 17:31:26 +00:00
Ganesh Vernekar 4592b77035
Patch by Krasi (https://github.com/codesome/tsdb/pull/3)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-01-11 22:04:09 +05:30
Kevin Bulebush 718344434c openstack_sd: Supporting application credential for authentication. (#4968)
* openstack_sd: Support application credentials for authentication.
Updated gophercloud

Signed-off-by: Kevin Bulebush <kmbulebu@gmail.com>
2019-01-09 15:18:58 +00:00
Lv Jiawei b8ede99767 Fix comment typo (#5087)
According to code, I think it is a typo.

Signed-off-by: MIBc <lvjiawei@cmss.chinamobile.com>
2019-01-09 10:56:47 +00:00
Matt Layher 43c9d9e91f promql: apply golint suggestions (#5066)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-01-08 18:26:02 +00:00
Ganesh Vernekar d7e505db34
Dont store stones in head, delete samples directly
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-01-08 22:38:41 +05:30
Björn Rabenstein 8cac9cbe1d
Merge pull request #5081 from prometheus/beorn7/release
Merge v2.6 bug fixes into master
2019-01-08 15:50:08 +01:00
beorn7 305f383af4 Adjust test_test.go to new Select return order
Signed-off-by: beorn7 <beorn@soundcloud.com>
2019-01-08 13:54:50 +01:00
beorn7 d6841c52e0 Merge branch 'release-2.6' 2019-01-08 12:46:18 +01:00
Björn Rabenstein d7225ac4a2
Merge pull request #5069 from codesome/bug-5064
Empty slice after last append in promql test LazyLoader
2019-01-08 12:44:12 +01:00
Frederic Branczyk fae49ab73b
Merge pull request #5071 from gouthamve/release-2.7-shepard
Propose myself (Goutham) as the 2.7 shepard
2019-01-07 18:29:15 +01:00
Simon Pasquier 62fca18f0a Add back indexFormatV1
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-07 17:37:12 +01:00
Simon Pasquier 597202ae43 Remove more unused code
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-07 14:45:17 +01:00
Ganesh Vernekar 341f04ca9c
Empty slice after last append in promql test LazyLoader
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2019-01-07 19:07:27 +05:30
Goutham Veeramachaneni 834adc9566
Propose myself as the 2.7 shepard
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2019-01-07 18:44:05 +05:30
Simon Pasquier 47166a7969 Fix chunkenc/chunk_test.go
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-07 12:39:11 +01:00
Frederic Branczyk e9ae0b5a1b
Merge pull request #4927 from tariq1890/update_k8s
update client-go to v10.0.0 and other k8s deps to v1.13.1
2019-01-07 10:54:34 +01:00
Krasi Georgiev 8d991bdc1e
Delete temp checkpoint folder on error. (#415) 2019-01-07 11:43:33 +03:00
Fabian Reinartz ca93c8e19b
Merge pull request #4969 from prometheus/azuresubid
Add Azure tenant and subscription ID labels
2019-01-06 12:25:06 +01:00
Simon Pasquier d5d7a097e1 Update Makefile.common
This change also uses the latest staticcheck version which comes with
new verifications, hence some clean up in the code.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 16:08:43 +01:00
Simon Pasquier f678e27eb6
*: use latest release of staticcheck (#5057)
* *: use latest release of staticcheck

It also fixes a couple of things in the code flagged by the additional
checks.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Use official release of staticcheck

Also run 'go list' before staticcheck to avoid failures when downloading packages.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-01-04 14:47:38 +01:00
Lv Jiawei b50ea4834f Fix typo in comment (#5061)
I think it is a typo in comment of Alert.ResolvedAt .

Signed-off-by: MIBc <lvjiawei@cmss.chinamobile.com>
2019-01-04 10:57:17 +00:00
tariqibrahim 9b4a25e7b0 use klog dependency
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2019-01-03 13:57:20 -08:00
tariqibrahim aa94efe4b5 Merge branch 'master' of https://github.com/prometheus/prometheus into update_k8s 2019-01-03 10:27:12 -08:00
Brian Brazil 296f943ec4
More efficient Merge implementation. (#486)
Avoid a tree of merge objects, which can result in
what I suspect is n^2 calls to Seek when using Without.

With 100k metrics, and a regex of ^$ in BenchmarkHeadPostingForMatchers:

Before:
BenchmarkHeadPostingForMatchers-8              1        51633185216 ns/op      29745528 B/op      200357 allocs/op

After:
BenchmarkHeadPostingForMatchers-8             10         108924996 ns/op 25715025 B/op     101748 allocs/op

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-01-03 16:59:52 +00:00
zhulongcheng 7632e976c0 Move the build badge to the badge list (#5060)
Move the `build` badge to the badge list.

Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-01-03 14:56:49 +00:00
glutamatt 5ddde1965b tune the "Wal segment size" with a flag (#5029)
Add WALSegmentSize as an option, and the corresponding flag "storage.tsdb.wal-segment-size" to tune the max size of wal segment files.

The addressed base problem is to reduce the disk space used by wal segment files : on a raspberry pi, for instance, we often want to reduce write load of the sd card, then, the wal directory is mounted on a memory (space limited) partition.

the default value of the segment max file size, pushed the size of directory to 128 MB for each segment , which is too much ram consumption on a rasp.

the initial discussion is at https://github.com/prometheus/tsdb/pull/450
2019-01-03 17:13:21 +03:00
Fabian Reinartz 93d13c59d0 Sort
Signed-off-by: Fabian Reinartz <freinartz@google.com>
2019-01-03 13:10:57 +01:00
Fabian Reinartz 7a41038695 Add Azure tenant and subscription ID labels
Signed-off-by: Fabian Reinartz <freinartz@google.com>
2019-01-03 13:09:13 +01:00
Tom Wilkie 121603c417
Expose rules.NewGroupMetrics and rules.Metrics. (#5059)
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2019-01-03 12:07:06 +00:00
Brian Brazil b2d7bbd6b1
Move series fetches out of inner loop of SortedPostings. (#485)
With 1M series:

Before:
BenchmarkHeadPostingForMatchers-8              1        3501996117 ns/op 61311520 B/op         78 allocs/op

After:
BenchmarkHeadPostingForMatchers-8              1        1403072952 ns/op 69261568 B/op         72 allocs/op

This works out as 3X faster, as the above time includes other things.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2019-01-03 10:35:10 +00:00
Krasi Georgiev 48c439d26d
fix statick check errors (#475)
fix the tests for `check_license` and `staticcheck`

the static check also found some actual bugs.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-01-02 19:48:42 +03:00
Tom Wilkie 6e08029b56
Move err to be the last return value from storage.Select. (#5054)
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2019-01-02 11:10:13 +00:00
Ganesh Vernekar 7d30ccd0eb Sort samples before comparing - PromQL unit test (#5052)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-12-31 10:55:49 +00:00
Krasi Georgiev eb6586f513
rename createPopulatedBlock to createBlock and use it instead ot createEmptyBlock (#488)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-12-29 14:20:51 +03:00
Krasi Georgiev a90a7195d4
createPopulatedBlock returns the block dir instead of the block (#487)
It is easy to forget to close the block returned by createPopulatedBlock
which causes failures for windows so instead it returns the block dir
and which can be used by OpenBlock explicitly.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-12-29 10:23:56 +03:00
Krasi Georgiev 090b6852e1
remove unused PrefixMatcher (#474)
* remove unused `PrefixMatcher`

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-12-28 21:13:02 +03:00
Krasi Georgiev 2e0571caba
remove unused WALFlushInterval option and NopWAL struct (#468)
The WALFlushInterval is not used anywhere in the code base.
The WAL is not an interface anymore to save some lookup time so can't use NopWAL in the tests. Instead can just pass nil as the code checks for that and it is essentially a noop.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-12-28 20:42:46 +03:00
Brian Brazil 915d7cf937
Add a tsdbutil command to analyse churn etc. (#478)
This reports the cardinality of each label,
the total number of label pairs,
and how much series worth of time is "uncovered"
by series data. Which is basically how much churn there is.

Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2018-12-28 17:06:12 +00:00
Bartek Płotka de213d4a5e rule manager: Moved metric registration to custom registerer which is already available. (#4961)
Signed-off-by: Bartek Plotka <bwplotka@gmail.com>
2018-12-28 10:20:29 +00:00
AixesHunter 806632790e update inconsistent comment (#5046)
Co-Authored-By: aixeshunter <44970652+aixeshunter@users.noreply.github.com>
Signed-off-by: aixeshunter <aixeshunter@gmail.com>
2018-12-27 14:02:36 +00:00
Eyal Levin d304269ac4 Update text (#5039)
The `rule_files` section is not inside the `global` configuration section

Signed-off-by: Eyal Levin <eyalev@gmail.com>
2018-12-25 13:28:56 +00:00