content/flux/v0/stdlib/contrib/qxip/logql/query_range.md
logql.query_range() queries data from a specified LogQL query within given time bounds,
filters data by query, timerange, and optional limit expressions.
All values are returned as string values (using raw mode in csv.from)
(
query: string,
?end: A,
?limit: B,
?orgid: string,
?path: string,
?start: C,
?step: D,
?url: string,
) => stream[E] where A: Timeable, B: Stringable, C: Timeable, D: Stringable, E: Record
{{% caption %}} For more information, see Function type signatures. {{% /caption %}}
LogQL/qryn URL and port. Default is http://qryn:3100.
LogQL query_range API path.
Query limit. Default is 100.
({{< req >}}) LogQL query to execute.
Earliest time to include in results. Default is -1h.
Results include points that match the specified start time.
Use a relative duration or absolute time.
For example, -1h or 2022-01-01T22:00:00.801064Z.
Latest time to include in results. Default is now().
Results exclude points that match the specified stop time.
Use a relative duration or absolute time.
For example, -1h or 2022-01-01T22:00:00.801064Z.
Query resolution step width in seconds. Default is 10.
Only applies to query types which produce a matrix response.
Optional Loki organization ID for partitioning. Default is "".
import "contrib/qxip/logql"
option logql.defaultURL = "http://qryn:3100"
logql.query_range(query: "{job=\"dummy-server\"}", start: -1h, end: now(), limit: 100)