QueryRange QueryRange
QueryRange Certified

yaml
type: "io.kestra.plugin.grafana.loki.QueryRange"
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
Default30
DefaultBACKWARD
Possible Values
FORWARDBACKWARD
Default100
Default60
SubTypeobject