* Fix race during head compaction
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Comment out the test
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
* Skip test instead of commenting it out
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
This PR downgrades the docker dependency to the stable 19.03 branch.
It means that we will negociate 1.40 by default and not the uncomplete
1.41 API.
It was not possible to use the stable branch before because a patch
was pending to build on netbsd and dragonfly:
a40b877fbb
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Since we dependend on go1.14 now, we can use T.Cleanup
https://golang.org/pkg/testing/#T.Cleanup
This provides a nicer approach to shut down the test server.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Sadly, just linking to the Histogram best practice document, as done
for `histogram_quantile`, would be confusing here because the best
practice document only deals with quantiles in the context of
Histograms and Summaries, which is very different from the context of
the `quantile` aggregator and `quantile_over_time` function, which is
already a source of a lot of confusion.
Thus, I think the least bad solution is to add a short explanation in
this section directly. There isn't even a good resource on the
internet we can link to. A lot of statisticians use φ-quantiles, but
they don't have a generally accepted name for it.
I have added the explanation after the other detailed explanations of
`count_values`, `topk` and `bottomk`. I think that fits quite nicely
into the flow.
Signed-off-by: beorn7 <beorn@grafana.com>
* OpenStack SD: Add availability config option, to choose endpoint type
In some environments Prometheus must query OpenStack via an alternative
endpoint type (gophercloud calls this `availability`.
This commit implements this option.
Co-Authored-By: Dennis Kuhn <d.kuhn@syseleven.de>
Signed-off-by: Steffen Neubauer <s.neubauer@syseleven.de>
Due to https://github.com/grafana/grafana/issues/15642, this prevents users putting this dashboard in a Grafana folder called 'Prometheus'.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Previously, hash-fragment links like this:
http://mark-t510:9090/targets#job-alertmanager
Would scroll to have the header at the top, obscured by the nav bar.
Tested in both old and new UIs.
Fixes#7434
Signed-off-by: Mark Hansen <markhansen@google.com>
To load ALERT_FOR_STATE only `storage.Queryable` interface is required,
so this patch uses this narrower interface for to perform this.
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>
* Optimized label regex matcher with literal prefix and/or suffix
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Added license
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Added more tests cases with newlines
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Restored deleted test
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Right now Queue Manager metrics are registered when the metrics struct
is created, which happens before a changed queue is shutdown and the old
metrics are unregistered. In the case of named queues or updates to
external labels the apply config will panic due to duplicate metrics.
Instead, register the metrics as part of starting the queue as we always
guarantee that Stop will be called before a new Start.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* Pending Samples metric includes samples in channel
The pending samples metric should also include samples waiting in the
channels to be sent to provide a more accurate measure. In addition,
make sure that the pending samples is reset to 0 anytime a queue is
started as we remake all of the shards at that time.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* Log the number of dropped samples on hard shutdown
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
jQuery prior to 3.4.0 is affected by an Object.prototype pollution
vulnerability (CVE-2019-11358). Even though our code doesn't seem to be
vulnerable to the issue, lets upgrade to the latest jQuery release so we
don't have to bother.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fixed nits introduced by https://github.com/prometheus/prometheus/pull/7334
* Added ChunkQueryable implementation to fanout and readyStorage.
* Added more comments.
* Changed NewVerticalChunkSeriesMerger to CompactingChunkSeriesMerger, removed tiny interface by reusing VerticalSeriesMergeFunc for overlapping algorithm for
both chunks and series, for both querying and compacting (!) + made sure duplicates are merged.
* Added ErrChunkSeriesSet
* Added Samples interface for seamless []promb.Sample to []tsdbutil.Sample conversion.
* Deprecating non chunks serieset based StreamChunkedReadResponses, added chunk one.
* Improved tests.
* Split remote client into Write (old storage) and read.
* Queryable client is now SampleAndChunkQueryable. Since we cannot use nice QueryableFunc I moved
all config based options to sampleAndChunkQueryableClient to aboid boilerplate.
In next commit: Changes for TSDB.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* value field more human readable
Signed-off-by: kisc <nuno_kisc@hotmail.com>
* fix typo
Signed-off-by: Nuno Cardoso <nuno_kisc@hotmail.com>
* add function convertSCToNumber
Signed-off-by: nunokisc <nuno_kisc@hotmail.com>
* add convertSCToNumber test
Signed-off-by: nunokisc <nuno_kisc@hotmail.com>
* normalize function name
Signed-off-by: kisc <nuno_kisc@hotmail.com>
* convertScientificNotationToNumber to parsePrometheusFloat
Signed-off-by: kisc <nuno_kisc@hotmail.com>
* Fixed returned API status code on error
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Fixed linter
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Simplified code
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Don't try and sync non-apache license files.
* Force create CODE_OF_CONDUCT.md.
* Switch to using an array of files to update.
Signed-off-by: Ben Kochie <superq@gmail.com>