log_volume_analysis
Analyze Loki log volume to rank top streams and flag high-cardinality labels that risk cardinality explosion, with retention hints from index stats.
Instructions
[READ][analysis] Top streams by volume + high-cardinality (high-churn) label warnings.
Ranks the highest-volume streams under the selector, flags labels with many distinct values as cardinality-explosion risks, and adds a retention hint from Loki index stats when available.
Args: selector: A Loki stream selector to scope the analysis (e.g. '{namespace="prod"}'). hours: Lookback window in hours (capped at the tool's max lookback). loki_target: Loki target name from config; omit for the default.
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": {
"selector": "<selector>"
},
"name": "log_volume_analysis"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | ||
| selector | Yes | ||
| loki_target | No |