Commit graph

7491 commits

Author SHA1 Message Date
Simon Pasquier 657199af22 Address Krasi comments
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-28 12:29:24 +02:00
Ganesh Vernekar 61d0868966 Fix TestCorrectNumTombstones (#399)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-28 13:26:29 +03:00
Simon Pasquier 5df757fdd4 zookeeper: fix panic
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-28 11:39:40 +02:00
Ganesh Vernekar 61b000ee0e
Fix review comments
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-28 15:00:51 +05:30
Catalin Patulea b4c7c80227 Reword chunk references, LSB usually means 'bits'. (#364)
https://en.wikipedia.org/wiki/Bit_numbering#Least_significant_bit

Signed-off-by: Catalin Patulea <catalinp@google.com>
2018-09-27 21:38:02 +03:00
Simon Pasquier 365931ea83 discovery: add metrics + send updates from one goroutine only
The added metrics are:

* prometheus_sd_discovered_targets
* prometheus_sd_received_updates_total
* prometheus_sd_updates_delayed_total
* prometheus_sd_updates_total

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-27 15:59:42 +02:00
Simon Pasquier f2d43af820
Merge pull request #4582 from simonpasquier/add-discovery-tests
discovery: add more tests
2018-09-27 15:18:42 +02:00
Ganesh Vernekar 6e712963e2 Fix updating of NumTombstones in block.Delete(..) (#385)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-27 14:43:22 +03:00
Simon Pasquier 07152ecc48
Merge pull request #4575 from Nexucis/bugfix/fix-unregistered-source
[ServiceDiscovery] Unregister source when the target is empty
2018-09-27 09:12:01 +02:00
Duane D'Souza d7b376afd4 Adding change to support s390x (#4605)
Signed-off-by: duane-ibm <duaned@us.ibm.com>
2018-09-26 15:48:54 +05:30
Krasi Georgiev 47a673c3a0
process scrape loops reloading in parallel (#4526)
The scrape manage receiver's channel now just saves the target sets
and another backgorund runner updates the scrape loops every 5 seconds.
This is so that the scrape manager doesn't block the receiving channel
when it does the long background reloading of the scrape loops.

Active and dropped targets are now saved in each scrape pool instead of
the scrape manager. This is mainly to avoid races when getting the
targets via the web api.

When reloading the scrape loops now happens in parallel to speed up the
final disared state and this also speeds up the prometheus's shutting
down.

Also updated some funcs signatures in the web package for consistency.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-09-26 12:20:56 +03:00
Augustin Husson f60620ec0b format comment
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2018-09-26 10:48:35 +02:00
Thomas Jackson abf6fe0a98 Change max/min over_time to handle NaNs properly (#4386)
We only want to return a NaN if the NaN is the only value

Signed-off-by: Thomas Jackson <jacksontj.89@gmail.com>

Fixes #4385
2018-09-26 08:58:16 +01:00
Tom Wilkie 4c52400708
Limit concurrent remote reads. (#4656)
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-09-25 20:07:34 +01:00
Tom Wilkie d3a1ff1abf
Reduce memory usage of remote read by reducing pointer usage. (#4655)
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-09-25 19:14:00 +01:00
Augustin Husson 9e6dc6f96c fix targetGroup that disappear totally
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2018-09-25 19:05:02 +02:00
Ganesh Vernekar 5790d23fd8 Unit testing for rules (#4350)
* Unit testing for rules
* Specifying order of group evaluation in unit tests

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-25 17:06:26 +01:00
Ganesh Vernekar 632dfb349e
Add new metrics.
1. 'prometheus_tsdb_wal_truncate_fail' for failed WAL truncation.
2. 'prometheus_tsdb_checkpoint_delete_fail' for failed old checkpoint delete.

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-25 18:50:57 +05:30
Simon Pasquier ff08c40091 discovery/openstack: support tls_config
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-25 14:31:32 +02:00
Callum Styan a971f52ac8 clean up after running repair tests (#372)
implement a `CopyDirs` helper to walk all dirs and subdirs and copy all files within to a destination folder.

Refactor `TestRepairBadIndexVersion` to use the `CopyDirs` so it works on a copy db and remove the copy after the test.
This allows running the test more than once and doesn't confuse git.

Signed-off-by: Callum Stytan <callumstyan@gmail.com>
2018-09-21 20:35:33 +03:00
Frederic Branczyk b75ec7e6ef
Merge pull request #4458 from FUSAKLA/k8s-sd-add-metrics
feat: added more k8s SD metrics
2018-09-21 13:10:48 +02:00
Timo Beckers 1c9fbd65c4 marathon-sd - change port gathering strategy, support for container networking (#4499)
* marathon-sd - change port gathering strategy, add support for container networking

- removed unnecessary error check on HTTPClientConfig.Validate()
- renamed PortDefinitions and PortMappings to PortDefinition and PortMapping respectively
- extended data model for extra parsed fields from Marathon json
- support container networking on Marathon 1.5+ (target Task.IPAddresses.x.Address)
- expanded test suite to cover all new cases
- test: cancel context when reading from doneCh before returning from function
- test: split test suite into Ports/PortMappings/PortDefinitions

Signed-off-by: Timo Beckers <timo@incline.eu>
2018-09-21 11:53:04 +01:00
Goutham Veeramachaneni 1a5a3d3be6
Merge pull request #4645 from prometheus/release-2.4
Merge release-2.4 into master
2018-09-21 15:38:12 +05:30
Martin Chodur dbd765a0e3 Refactor Makefile to use Makefile.common (#324)
make use of the Makefile.common

Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2018-09-21 11:08:38 +03:00
Krasi Georgiev d05611c027
removed some unused code and moved mockSeriesSet in querier_test (#394)
Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-09-21 11:07:35 +03:00
Goutham Veeramachaneni c305ffaa09
release 2.4.2 (#4636)
* vendor: Update prometheus/tsdb

This time, properly

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* release 2.4.2

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-09-21 12:48:39 +05:30
Krasi Georgiev d38516b1c2
remove unused changes variable (#391)
This was added in
55a9b5428a

and later not used after some refactoring in following PRs.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-09-21 09:24:01 +03:00
Chris Marchbanks 2db59a71a6 Fix assert order being backwards in a few places (#388)
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2018-09-21 09:23:01 +03:00
Ganesh Vernekar e779603633 Reuse testutil (#393)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2018-09-21 11:47:59 +05:30
Goutham Veeramachaneni 9c8ca47399
Fix filehandling for windows (#392)
* Fix filehandling for windows

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Fix more windows filehandling issues

Windows: Close files before deleting Checkpoints.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

Windows: Close writers in case of errors so they can be deleted

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

Windows: Close block so that it can be deleted.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

Windows: Close file to delete it

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

Windows: Close dir so that it can be deleted.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

Windows: close files so that they can be deleted.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>

* Review feedback

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-09-21 11:01:22 +05:30
Martin Chodur f2d037133e
feat: added more k8s SD metrics
Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
2018-09-20 22:28:51 +02:00
Julius Volz 5ae6c60d39 Handle a bunch of unchecked errors (#365)
As discovered by "gosec".

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-09-20 11:33:52 +03:00
Goutham Veeramachaneni ce6716fe90
release 2.4.1 (#4632)
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-09-19 19:04:43 +05:30
Goutham Veeramachaneni 5a24560d2b
vendor: update prometheus/tsdb (#4631)
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-09-19 14:35:33 +05:30
Simon Pasquier 2d7f562ed6 web: fix asset paths for Windows platforms (#4616)
* web: fix asset paths for Windows platforms

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

* web: add tests

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-09-19 12:50:53 +05:30
Fabian Reinartz dfcb7d0d50
Merge pull request #389 from gouthamve/wal-corruptio
Make sure WAL Repair can handle wrapped errors
2018-09-19 08:47:24 +02:00
Goutham Veeramachaneni c7d0d10da4
Make sure WAL Repair can handle wrapped errors
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-09-19 12:12:25 +05:30
Björn Rabenstein d1a6edae6f
Merge pull request #386 from prometheus/beorn7/client_golang
Revert "Remove `prometheus_` prefix from metrics"
2018-09-18 19:27:31 +02:00
beorn7 3bc6c670fa Revert "Remove prometheus_ prefix from metrics"
This reverts commit 98fe30438c.

After some discussion, it was concluded that we want the full
`prometheus_tsdb_...` prefix hardcoded in the library.

Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-18 19:19:19 +02:00
Camille Janicki b035ea0ea9 Change discovery subpackages to not use testify in tests (#4612)
* Change discovery subpackages to not use testify in tests

Signed-off-by: Camille Janicki <camille.janicki@gmail.com>

* Remove testify suite from vendor dir

Signed-off-by: Camille Janicki <camille.janicki@gmail.com>
2018-09-18 17:35:22 +02:00
Harsh Agarwal 18a9a390b5 Add duplicate-labelset check for range/instant vectors (#4589)
Signed-off-by: Harsh Agarwal <cs15btech11019@iith.ac.in>
2018-09-18 10:46:13 +01:00
Augustin Husson 3c0b130e5e apply review
Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
2018-09-18 11:08:38 +02:00
Chris Marchbanks a8966cb53d Fix race condition between gc and committing (#378)
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
2018-09-17 19:58:42 +03:00
Callum Styan 722f0ab920 break MigrateWAL into two functions, detection and migration (#371)
Signed-off-by: Callum Styan <callumstyan@gmail.com>
2018-09-17 19:30:56 +03:00
Frederic Branczyk 1b651ea7d4
Merge pull request #383 from prometheus/beorn7/client_golang
Remove `prometheus_` prefix from metrics
2018-09-17 15:16:04 +02:00
beorn7 98fe30438c Remove prometheus_ prefix from metrics
This can now be added by users of the library as needed with the new
https://godoc.org/github.com/prometheus/client_golang/prometheus#WrapRegistererWithPrefix

Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-17 14:54:28 +02:00
Björn Rabenstein cfbd72b4f1
Merge pull request #4620 from prometheus/beorn7/client_golang
Update to current client_golang
2018-09-17 14:28:47 +02:00
Krasi Georgiev ad459ca1f4
re-added TestDeleteUntilCurMax TestDelete_e2e (#382)
no logic changes just uncommented and fixed the issues.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2018-09-17 14:28:55 +03:00
beorn7 4fb59d1e61 Remove use of deprecated prometheus.Handler
Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-17 13:05:43 +02:00
beorn7 5e4a76e66b Update vendoring of client_golang and friends
Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-17 13:03:28 +02:00