Skip to content

MCP: Add parser-specific insights to the inspection summary #1046

Open

Description

@kyasbal

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 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

Activity

  1. added
    type:feature
    area:backend-core
    area:backend-parser
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:backend-corearea:backend-parsertype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions