Commit Graph

113 Commits

Author SHA1 Message Date
Björn Rabenstein 933f50bcda
Merge pull request #10121 from prometheus/beorn7/promql
PromQL: Promote negative offset and @ modifer to stable
2022-01-12 14:09:46 +01:00
Abhishek 2f4289a3bf
add limit to the rules api (#10152) 2022-01-11 22:44:22 -05:00
beorn7 b39f2739e5 PromQL: Always enable negative offset and @ modifier
This follows the line of argument that the invariant of not looking
ahead of the query time was merely emerging behavior and not a
documented stable feature. Any query that looks ahead of the query
time was simply invalid before the introduction of the negative offset
and the @ modifier.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-01-11 17:08:55 +01:00
beorn7 8fdfa52976 API: Promote remote-write-receiver to stable
Since `/api/v1/write` is a mutating endpoint, we should still activate
the remote-write-receiver explicitly. But we should do it in the same
way as the other mutating endpoints, i.e. via a flag
`--web.enable-remote-write-receiver`.

This commit marks the feature flag as deprecated, i.e. it still works
but logs a warning on startup. This enables users to seamlessly
migrate. With the next minor release, we can start ignoring the
feature flag (but still warn a user that is trying to use it).

Signed-off-by: beorn7 <beorn@grafana.com>
2022-01-05 15:36:07 +01:00
Julian Wiedmann 18886c33c2
docs/operators: fix a typo (#9559)
s/are preserved the output/are preserved in the output

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
2021-10-21 14:35:52 +02:00
Ivana Huckova a069e7ec80
Update api.md (#9429)
Fix timestamp in example in exemplars query. The year was `020` instead of `2020`.

Signed-off-by: Ivana <ivana.huckova@gmail.com>
2021-10-03 12:22:47 +02:00
Levi Harrison a7de0cf276 Remove example and experimental
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-27 07:00:08 -04:00
Levi Harrison a16a4cad2d Add example
Credit goes to @leonerd for the original example

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-26 16:35:02 -04:00
Levi Harrison 2f896c98ff Address review comments
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-26 15:45:25 -04:00
Levi Harrison a283b52e8c Added unit
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-23 10:30:46 -04:00
Levi Harrison be6ce7bcc2 Add docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-23 10:30:46 -04:00
Levi Harrison 6faca22eec Add inverse hyperbolic functions
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 74faea64dd Removed specification of pi digits
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 53d88fd147 Added hyperbolic trig functions
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 51bb3d4a27 Changed radian wording
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison 535d8904f7 Link to docs for special cases
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:10 -04:00
Levi Harrison e5a44964ff Added docs
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-09-15 22:47:09 -04:00
Levi Harrison 70f597b033
Configure Scrape Interval and Timeout Via Relabeling (#8911)
* Configure scrape interval and timeout with labels

Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-31 17:37:32 +02:00
Levi Harrison b9b5adfe62 Rename links
Signed-off-by: Levi Harrison <git@leviharrison.dev>
2021-08-06 21:54:44 -06:00
Darshan Chaudhary c4f2e9eec5
Add present_over_time (#9097)
* Add present_over_time

Signed-off-by: darshanime <deathbullet@gmail.com>

* Add tests for present_over_time

Signed-off-by: darshanime <deathbullet@gmail.com>

* Address PR comments

Signed-off-by: darshanime <deathbullet@gmail.com>

* Add documentation for present_over_time

Signed-off-by: darshanime <deathbullet@gmail.com>

* Update documentation

Signed-off-by: darshanime <deathbullet@gmail.com>

* Update documentation comment

Signed-off-by: darshanime <deathbullet@gmail.com>
2021-07-29 12:38:11 +02:00
Richard Hartmann d68d3983d8 Make clear that start/end are inclusive
Fixes: https://github.com/prometheus/prometheus/issues/9100

Signed-off-by: Richard Hartmann <richih@richih.org>
2021-07-28 14:52:02 +02:00
smedbergM 034cdb0aa4 Revert change in label_join per @RichiH
Signed-off-by: smedbergM <matthew.smedberg@gmail.com>
2021-06-15 13:55:02 -06:00
smedbergM 918c06feb9 Merge branch 'main' into label-replace-docs 2021-06-15 12:27:09 -06:00
Levi Harrison 7bc11dcb06
React UI: Add Starting Screen (#8662)
* Added walreplay API endpoint

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Added starting page to react-ui

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Documented the new endpoint

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Fixed typos

Signed-off-by: Levi Harrison <git@leviharrison.dev>

Co-authored-by: Julius Volz <julius.volz@gmail.com>

* Removed logo

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed isResponding to isUnexpected

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed width of progress bar

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed width of progress bar

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Added DB stats object

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Updated starting page to work with new fields

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Passing nil

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Passing nil (pt. 2)

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Passing nil (pt. 3)

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Passing nil (and also implementing a method this time) (pt. 4)

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Passing nil (and also implementing a method this time) (pt. 5)

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed const to let

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Passing nil (pt. 6)

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Remove SetStats method

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Added comma

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed api

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed to triple equals

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Fixed data response types

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Don't return pointer

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Changed version

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Fixed interface issue

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Fixed pointer

Signed-off-by: Levi Harrison <git@leviharrison.dev>

* Fixed copying lock value error

Signed-off-by: Levi Harrison <git@leviharrison.dev>

Co-authored-by: Julius Volz <julius.volz@gmail.com>
2021-06-05 15:29:32 +01:00
Matthew Smedberg 8490273bac docs :: querying :: functions :: label_replace
Clarify documentation for label_replace() because of ambiguities
between label keys and label values.

Signed-off-by: Matthew Smedberg <matthew.smedberg@gmail.com>
2021-04-27 10:32:36 -06:00
Julien Pivotto 0414534499
Merge pull request #6947 from prometheus/document-global-labels
Add new "globalUrl" field to /api/v1/targets docs
2021-03-30 22:41:47 +02:00
Callum Styan 289ba11b79
Add circular in-memory exemplars storage (#6635)
* Add circular in-memory exemplars storage

Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Signed-off-by: Martin Disibio <mdisibio@gmail.com>

Co-authored-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Co-authored-by: Tom Wilkie <tom.wilkie@gmail.com>
Co-authored-by: Martin Disibio <mdisibio@gmail.com>

* Fix some comments, clean up exemplar metrics struct and exemplar tests.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Fix exemplar query api null vs empty array issue.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

Co-authored-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
Co-authored-by: Tom Wilkie <tom.wilkie@gmail.com>
Co-authored-by: Martin Disibio <mdisibio@gmail.com>
2021-03-16 15:17:45 +05:30
Julius Volz 1cba174182
Document lack of metadata deletion in deletion API (#8376)
* Document lack of metadata deletion in deletion API

See also https://github.com/prometheus/prometheus/issues/7932

I also fixed the other "NOTE" callouts to be formatted in such a way that our
docs system formats them as callout boxes.

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* WIP

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Improve wordings

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2021-03-15 23:09:29 +01:00
schou 65658091ed moved details of feature to disabled features.md
Signed-off-by: schou <pschou@users.noreply.github.com>
2021-03-03 21:42:17 -05:00
schou 946dba6a7f small suggested changes
Signed-off-by: schou <pschou@users.noreply.github.com>
2021-03-03 21:35:51 -05:00
pschou f80b52be69
Merge branch 'main' into dev_neg_offset 2021-02-23 20:52:57 -05:00
schou 71712183ac minor wording updates
Signed-off-by: schou <pschou@users.noreply.github.com>
2021-02-23 20:26:35 -05:00
schou 22cd48868a adding feature flag, promql-negative-offset
Signed-off-by: schou <pschou@users.noreply.github.com>
2021-02-23 20:25:56 -05:00
schou 8aa9cc3978 add blob to basics documentation about negative shift
Signed-off-by: schou <pschou@users.noreply.github.com>
2021-02-23 20:25:56 -05:00
pschou aff3c702ab
promql: Add sgn, clamp and last_over_time functions (#8457)
* Add sgn, clamp and last_over_time functions

Signed-off-by: schou <pschou@users.noreply.github.com>
2021-02-20 16:34:52 +01:00
Ganesh Vernekar 86c71856e8
Add start() and end() pre-processors for @ modifier (#8425)
* Add start() and end() pre-processors for @ modifier

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix reviews

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix review comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>

* Fix review comments

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2021-02-09 21:33:16 +05:30
Ganesh Vernekar 9199fcb8d1
'@ <timestamp>' modifier (#8121)
This commit adds `@ <timestamp>` modifier as per this design doc: https://docs.google.com/document/d/1uSbD3T2beM-iX4-Hp7V074bzBRiRNlqUdcWP6JTDQSs/edit.

An example query:

```
rate(process_cpu_seconds_total[1m]) 
  and
topk(7, rate(process_cpu_seconds_total[1h] @ 1234))
```

which ranks based on last 1h rate and w.r.t. unix timestamp 1234 but actually plots the 1m rate.

Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
2021-01-20 16:27:39 +05:30
Ben Ye caa173d2aa
Support matchers for Labels API (#8301)
Signed-off-by: Ben Ye <yb532204897@gmail.com>
Co-authored-by: Erik Klockare <eklockare@gmail.com>
2020-12-22 11:02:19 +00:00
Justin Toh 5f103aaecc
docs: Fix "time duration" link (#8209)
Signed-off-by: Justin Toh <tohjustin@hotmail.com>
2020-11-20 12:25:45 +00:00
Dustin Hooten 916dbd4c8a
React UI: Implement missing TSDB head stats section (#7876)
* React UI: Implement missing TSDB head stats section

Signed-off-by: Dustin Hooten <dhooten@splunk.com>

* Add break

Signed-off-by: Dustin Hooten <dhooten@splunk.com>
2020-09-29 22:05:33 +02:00
Julien Pivotto e208afcc95
web: Remove APIv2 (#7935)
* web: Remove APIv2

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-09-15 09:30:55 +02:00
showuon dba729f6b6
Referring to configuration.md, to have a Generic placeholders definition section (#7875)
Signed-off-by: Luke Chen <showuon@gmail.com>
2020-09-01 09:37:09 +01:00
Julien Pivotto 6f9e7ff750
Drop metric name in bool comparison between two instant vectors (#7819)
* Drop metric name in bool comparison between two instant vectors

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-22 21:04:03 +02:00
showuon 274dce9de2
Add a link to Clean TombStone for better reference (#7830)
Signed-off-by: Luke Chen <showuon@gmail.com>
2020-08-20 12:57:01 +01:00
Julien Pivotto d867491364
Human-friendly durations in PromQL (#7713)
* Add support for user-friendly durations

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-08-04 21:12:41 +02:00
Julius Volz 9da59c856d
Improve scalar literal format documentation (#7651)
* Improve scalar literal format documentation

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Address review comments

Signed-off-by: Julius Volz <julius.volz@gmail.com>

* Fixup

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-07-25 13:34:57 +02:00
Julien Pivotto e17d18a043
docs: Fix type of the histogram_quantile function (#7666)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-07-25 00:21:50 +02:00
beorn7 cf698f71e5 Add an explanation for the quantile aggregation operator
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>
2020-07-06 19:53:12 +02:00
Julien Pivotto 72425d4e3d
Add group() aggregator (#7480)
* Add group() aggregator

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-30 16:51:18 +02:00
B++ d6374ae1b6
Return NaN for histogram_quantile when buckets have 0 observations (#7318)
Signed-off-by: jberny <f.bernardi89@gmail.com>
2020-06-01 09:40:39 +01:00