* 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>
use ?wait=10m will give results as fast as usual when data is changing
but will perform far less requests when services do not change.
On large infrastructure, this will reduce quite a lot the number of
qps on Consul servers while having the same performance for freshness
of results.
Signed-off-by: Pierre Souchay <p.souchay@criteo.com>
Sections with three backticks require a blank line before them.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
Co-authored-by: Alex Vandiver <github@chmrr.net>