Repository navigation
Open
Labels
area:backend-coreCore backend frameworks, DAG task runner, and server APIarea:backend-parserLog parsers and log timeline mapper taskstype:featureNew feature or request
Description
Part of #1049 / Depends on #1039
Summary
Add aggregations based on knowledge from each log parser to the summary from #1039, so that agents can notice important signs before reading detailed data.
Candidates
- Kubernetes Event: counts by Warning reason, and top frequent messages.
- GKE Autoscaler: counts of scale-up and scale-down, and reasons why scaling could not happen.
- Kubernetes Audit: counts of failed requests by status code and resource type.
- Node and serial port: detection of OOM Killer, kernel panic, and Kubelet anomalies.
Specification
- Write only using functions in the
summarypackage (pkg/core/inspection/summary) from MCP: Inspection list and AI summary resources #1039. - Do not increase the summary size proportionally to data volume. Limit the count, such as top N items.
- Do not add new tools. Results appear in the summary returned by
khi://inspections/{id}from MCP: Inspection list and AI summary resources #1039.
Write example
// Mapper task of the Kubernetes Event parser.
func mapEvent(ctx context.Context, ev *corev1.Event) error {
if ev.Type == "Warning" {
summary.AddIntProperty(ctx, "warningEventsByReason."+ev.Reason, 1)
}
// ...
}Reading khi://inspections/{id}
{
"jsonrpc": "2.0",
"id": 7,
"method": "resources/read",
"params": { "uri": "khi://inspections/2026-09-24-0130-a1b2" }
}Example of the part added to the output summary
## Kubernetes Event
### Warning events by reason (top 5 of 12)
| Reason | Count |
| --- | --- |
| BackOff | 412 |
| Unhealthy | 138 |
| FailedScheduling | 57 |
| OOMKilling | 21 |
| FailedMount | 9 |
### Most frequent warning messages (top 3)
- `Back-off restarting failed container nginx in pod nginx-7d9` (211)
- `Readiness probe failed: HTTP probe failed with statuscode: 503` (97)
- `0/3 nodes are available: 3 Insufficient memory.` (57)If truncated to top N items, include the total count in the heading.
Acceptance criteria
- For each targeted parser, aggregations appear in the feature section of the summary.
- The maximum limit of aggregations is verified by tests.
Related code
pkg/core/inspection/summary/: Added in MCP: Inspection list and AI summary resources #1039.pkg/task/inspection/: Each log parser.
Metadata
Metadata
Assignees
Labels
area:backend-coreCore backend frameworks, DAG task runner, and server APIarea:backend-parserLog parsers and log timeline mapper taskstype:featureNew feature or request
Activity