query_loki_logs
Run a LogQL range query to retrieve logs from Grafana Loki, filtered by time range and direction.
Instructions
Run a Loki range query through Grafana datasource proxy.
Args:
query: LogQL expression, e.g. {app="myservice"} |= "error".
limit: Maximum number of log lines to return (1–5000, default 100).
direction: "backward" (newest first, default) or "forward".
start: Start of the time range. RFC 3339 or Unix nanosecond string.
end: End of the time range. RFC 3339 or Unix nanosecond string.
Returns: JSON payload from Loki with streams and log entries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| limit | No | ||
| query | Yes | ||
| start | No | ||
| direction | No | backward |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||