Commit graph

142 commits

Author SHA1 Message Date
Julien Pivotto fc2e4cd3b9 docs: Fix link to feature flags.
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-07-11 13:17:39 +02:00
Chance Feick 2cfd8da628
Update docs/querying/basics.md
Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
Signed-off-by: Chance Feick <6326742+chancefeick@users.noreply.github.com>
2022-11-15 08:10:44 -08:00
Chance Feick 52270d6216 Fix relative link to use .md file extension
Signed-off-by: Chance Feick <cfeick@gitlab.com>
2022-11-14 13:30:22 -08:00
Björn Rabenstein 41035469d3
Document the native histogram feature flag and PromQL (#11446)
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2022-10-14 18:16:12 +05:30
Björn Rabenstein 50529b4804
doc: Document the native histogram JSON format (#11454)
As used in the HTTP query API.

Signed-off-by: beorn7 <beorn@grafana.com>
2022-10-14 17:08:31 +05:30
Jesus Vazquez e934d0f011 Merge 'main' into sparsehistogram
Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
2022-10-05 22:14:49 +02:00
Harold Dost 58b7c890a1
Merge pull request #7266 from hdost/feat/7192-add-documentation-for-api
documentation: Add Reference to the remote read API
2022-09-06 12:09:27 +02:00
relandrew dfc62920c2
docs: fix typo (#11156)
Signed-off-by: Andrew <106606303+relandrew@users.noreply.github.com>

Signed-off-by: Andrew <106606303+relandrew@users.noreply.github.com>
2022-08-16 09:30:10 +02:00
Björn Rabenstein bcd548c88b
Merge pull request #10076 from mtfoley/docs-deriv
docs: update function docs on deriv
2022-08-11 11:49:21 +02:00
beorn7 c9fd3c235d Merge branch 'main' into sparsehistogram 2022-08-10 17:54:37 +02:00
Julius Volz b57deb6eb0
Add /api/v1/format_query API endpoint for formatting queries (#11036)
* Add /api/v1/format_query API endpoint for formatting queries

This uses the formatting functionality introduced in
https://github.com/prometheus/prometheus/pull/10544.

I've chosen "query" instead of "expr" in both the endpoint and parameter
names to stay consistent with the existing API endpoints. Otherwise, I
would have preferred to use the term "expr".

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

* Add docs for /api/v1/format_query endpoint

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

* Add note that formatting expressions removes comments

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2022-07-20 14:55:09 +02:00
Julien Pivotto cf0fdd557e
docs: Change relabelling -> relabeling (#11006)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-07-14 13:49:30 +02:00
beorn7 28f028e938 Merge branch 'main' into sparsehistogram 2022-07-12 19:07:13 +02:00
Harold Dost 193e68b9c9 documentation: Add Reference to the remote read API
- For now this is relatively simplistic, but at least acknowledges some
  of the basics, and points out some parts that might not be obvious at first.

Relates to #7192

Signed-off-by: Harold Dost <h.dost@criteo.com>
2022-07-08 14:50:09 -04:00
Richard Hartmann 7bb6e7dadd
Merge pull request #10707 from hdost/docs/2106-vector-matching
docs: Add subsections for vector matching
2022-07-05 15:24:47 +02:00
beorn7 9eafed0f79 promql: Add histogram_count and histogram_sum
This follow a simple function-based approach to access the count and
sum fields of a native Histogram. It might be more elegant to
implement “accessors” via the dot operator, as considered in the
brainstorming doc [1]. However, that would require the introduction of
a whole new concept in PromQL. For the PoC, we should be fine with the
function-based approch. Even the obvious inefficiencies (rate'ing a
whole histogram twice when we only want to rate each the count and the
sum once) could be optimized behind the scenes.

Note that the function-based approach elegantly solves the problem of
detecting counter resets in the sum of observations in the case of
negative observations. (Since the whole native Histogram is rate'd,
the counter reset is detected for the Histogram as a whole.)

We will decide later if an “accessor” approach is really needed. It
would change the example expression for average duration in
functions.md from

      histogram_sum(rate(http_request_duration_seconds[10m]))
	/
      histogram_count(rate(http_request_duration_seconds[10m]))

to

      rate(http_request_duration_seconds.sum[10m])
	/
      rate(http_request_duration_seconds.count[10m])

[1]: https://docs.google.com/document/d/1ch6ru8GKg03N02jRjYriurt-CZqUVY09evPg6yKTA1s/edit

Signed-off-by: beorn7 <beorn@grafana.com>
2022-06-28 18:16:48 +02:00
beorn7 a3a8f58bb3 promql: Add histogram_fraction function
Signed-off-by: beorn7 <beorn@grafana.com>
2022-06-28 15:58:03 +02:00
Julien Pivotto 42f574d5ac
Remove "This function was added in Prometheus 2.0" (#10719)
Since Prometheus documentation is versioned, do not write down that a
specific function was added in Prom 2.0, for consistency.

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-05-20 21:43:58 +02:00
Ivo Gosemann e22b54e253 Adds day_of_year function to PromQL
Signed-off-by: Ivo Gosemann <ivo.gosemann@sap.com>
2022-05-20 14:08:34 +02:00
Harold Dost b2851b150d docs: Add subsections for vector matching
* Provide a callout about the vector matching keywords and the group
  modifiers.

Relates prometheus/docs#2106

Signed-off-by: Harold Dost <h.dost@criteo.com>
2022-05-17 18:42:39 +02:00
Ted Robertson 9558b9b54b
Examples: explain what the duration in brackets means (#10589)
Signed-off-by: Ted Robertson <10043369+tredondo@users.noreply.github.com>
2022-04-27 11:31:01 +02:00
Ted Robertson 08de38b700 Api docs: fix link to time durations
Signed-off-by: Ted Robertson <10043369+tredondo@users.noreply.github.com>
2022-04-11 14:12:21 +02:00
Matthew b6630876d3 remove impl details from docs
Signed-off-by: mtfoley <mtfoley.mae@gmail.com>
2022-02-19 08:44:43 -05:00
Matthew 00578d245b
Merge branch 'prometheus:main' into docs-deriv 2022-02-19 08:37:09 -05:00
jyz0309 e40deb1086 address comment
Signed-off-by: jyz0309 <45495947@qq.com>
2022-02-15 22:09:17 +08:00
jyz0309 02e032884a add doc
Signed-off-by: jyz0309 <45495947@qq.com>
2022-02-13 21:59:03 +08:00
Matthew 0a7baf8112
Merge branch 'prometheus:main' into docs-deriv 2022-01-15 11:02:42 -05:00
SuperQ a3dd323a53
Make regex-matching docs more obvious
Split out the note about regex-matching into a separate paragraph to
make it more obvious. Move it up, closer to the definition.

Signed-off-by: SuperQ <superq@gmail.com>
2022-01-14 23:18:31 +01:00
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
Matthew 57b86cfe9e docs: update function docs on deriv
Signed-off-by: mtfoley <mtfoley.mae@gmail.com>
2021-12-22 21:32:04 -05: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