[DOCS] API: Document the lookback_delta parameter

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
Bryan Boreham 2025-09-30 10:47:01 +01:00
parent 536a2b1fd2
commit a59f3e090b
2 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,7 @@ URL query parameters:
- `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and - `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and
is capped by the value of the `-query.timeout` flag. is capped by the value of the `-query.timeout` flag.
- `limit=<number>`: Maximum number of returned series. Doesnt affect scalars or strings but truncates the number of series for matrices and vectors. Optional. 0 means disabled. - `limit=<number>`: Maximum number of returned series. Doesnt affect scalars or strings but truncates the number of series for matrices and vectors. Optional. 0 means disabled.
- `lookback_delta=<number>`: Override the the [lookback period](#staleness) just for this query. Optional.
The current server time is used if the `time` parameter is omitted. The current server time is used if the `time` parameter is omitted.
@ -157,6 +158,7 @@ URL query parameters:
- `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and - `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and
is capped by the value of the `-query.timeout` flag. is capped by the value of the `-query.timeout` flag.
- `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled. - `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled.
- `lookback_delta=<number>`: Override the the [lookback period](#staleness) just for this query. Optional.
You can URL-encode these parameters directly in the request body by using the `POST` method and You can URL-encode these parameters directly in the request body by using the `POST` method and
`Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large `Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large

View File

@ -393,6 +393,7 @@ Prometheus needs to assign a value at those timestamps for each relevant time
series. It does so by taking the newest sample that is less than the lookback period ago. series. It does so by taking the newest sample that is less than the lookback period ago.
The lookback period is 5 minutes by default, but can be The lookback period is 5 minutes by default, but can be
[set with the `--query.lookback-delta` flag](../command-line/prometheus.md) [set with the `--query.lookback-delta` flag](../command-line/prometheus.md)
or overridden on an individual query via the `lookback_delta` parameter.
If a target scrape or rule evaluation no longer returns a sample for a time If a target scrape or rule evaluation no longer returns a sample for a time
series that was previously present, this time series will be marked as stale. series that was previously present, this time series will be marked as stale.