loki_patterns
Mine a container's recent logs for recurring patterns, turning thousands of lines into ranked templates with occurrence counts to summarize what a noisy service is saying.
Instructions
Mine a container's recent logs into recurring patterns — the fastest
way to summarize what a noisy service is saying. One call turns
thousands of lines into a ranked list of templates (<_> marks the
variable parts) with occurrence counts.
container: exact container name (use loki_list_containers / loki_tail_container to find it). minutes: how far back to mine. Default 60.
Requires the Loki pattern ingester; only logs ingested after it was enabled are mined, so a small window right after enablement is normal.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"container": "<container>"
},
"name": "loki_patterns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| minutes | No | ||
| container | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |