
QueryRange
CertifiedRun range LogQL query in Loki
QueryRange
Certified
Run range LogQL query in Loki
yaml
type: io.kestra.plugin.grafana.loki.QueryRangeExamples
yaml
id: query_loki_errors
namespace: company.team
tasks:
- id: fetch_errors
type: io.kestra.plugin.grafana.loki.QueryRange
url: http://localhost:3100
query: '{job="api"} |= "error"'
since: 1h
limit: 1000
yaml
id: query_loki
namespace: company.team
tasks:
- id: fetch_logs
type: io.kestra.plugin.grafana.loki.QueryRange
url: https://loki.example.com
token: "{{ secret('LOKI_TOKEN') }}"
tenantId: team-a
query: '{namespace="production", container="frontend"}'
start: "2024-01-01T00:00:00Z"
end: "2024-01-01T23:59:59Z"
limit: 5000
direction: BACKWARD
yaml
id: loki_test
namespace: company.team
tasks:
- id: query_metrics
type: io.kestra.plugin.grafana.loki.QueryRange
url: http://localhost:3100
query: 'rate({job="api"}[5m])'
start: "{{ now() | dateAdd(-6, 'HOURS') }}"
step: 1m
Properties
query *Requiredstring
url *Requiredstring
authToken string
connectTimeout integerstring
Default
30direction string
Default
BACKWARDPossible Values
FORWARDBACKWARDend string
interval string
limit integerstring
Default
100pluginDefaultsRef Non-dynamicstring
readTimeout integerstring
Default
60since string
start string
step string
tenantId string
Outputs
logs array
SubTypeobject