query_loki_logs
Execute LogQL queries against Loki datasources to retrieve log entries and metric values within specified time ranges for monitoring and analysis.
Instructions
Executes a LogQL query against a Loki datasource to retrieve log entries or metric values
Input Schema
Name | Required | Description | Default |
---|---|---|---|
datasourceUid | Yes | The UID of the datasource to query | |
direction | No | Direction of the query | |
endRfc3339 | No | The end time of the query in RFC3339 format | |
limit | No | Maximum number of log lines to return (default: 10, max: 100) | |
logql | Yes | The LogQL query to execute against Loki | |
startRfc3339 | No | The start time of the query in RFC3339 format |
Input Schema (JSON Schema)
{
"properties": {
"datasourceUid": {
"description": "The UID of the datasource to query",
"type": "string"
},
"direction": {
"description": "Direction of the query",
"enum": [
"forward",
"backward"
],
"type": "string"
},
"endRfc3339": {
"description": "The end time of the query in RFC3339 format",
"type": "string"
},
"limit": {
"description": "Maximum number of log lines to return (default: 10, max: 100)",
"type": "number"
},
"logql": {
"description": "The LogQL query to execute against Loki",
"type": "string"
},
"startRfc3339": {
"description": "The start time of the query in RFC3339 format",
"type": "string"
}
},
"required": [
"datasourceUid",
"logql"
],
"type": "object"
}