lookout triage events
Deduped chronological event timeline: kubectl get events, but collapsed by (object, reason family) over a workload’s whole owner-reference tree, with HPA rescale-oscillation (thrash) detection. Namespace and -A timelines roll a pod owner’s (or the Nodes’) shared reason up into one entry with objects= and examples=, so a busy cluster’s hour stays readable; —per-object lists every object.
MCP tool: k8s_event_timeline
lookout triage events [flags]| Flag | Type | Default | Meaning |
|---|---|---|---|
--hpa-window | duration | 30m | report event.hpa_thrash when enough scale-direction changes fall inside a window this long |
--hpa-flips | int | 2 | scale-direction changes within —hpa-window that count as thrash (2 = up→down→up) |
--per-object | bool | — | namespace and -A timelines: one entry per object instead of rolling up a pod owner’s (or the Nodes’) shared reason at 3+ objects (5+ for warnings); —workload timelines are always per object |
Common flags (every lookout command)
Section titled “Common flags (every lookout command)”| Flag | Type | Default | Meaning |
|---|---|---|---|
--namespace | string | — | limit the scan to one namespace |
-A | bool | — | scan all namespaces |
--workload | string | — | target one workload as <Kind>/<namespace>/<name>, e.g. Deployment/prod/api |
--since | duration | — | how far back to look (0 = command default) |
--format | string | logfmt | output format: logfmt|json (one record per line either way) |
--timeout | duration | 10s | abort the invocation after this long (exit 1) |
--kubeconfig | string | — | path to a kubeconfig file, instead of $KUBECONFIG / ~/.kube/config |
--kubeconfig-dir | string | — | directory of kubeconfig files to fan out across (mutually exclusive with —kubeconfig); each finding is stamped with cluster=<label> and the summary reports clusters=<n> |
--context | string | — | kubeconfig context to read, instead of its current-context. Selects a cluster for THIS invocation only — nothing is written back — so concurrent invocations can target different clusters. Reported as context=<name> in the summary line |
--contexts | string | — | comma-separated kubeconfig contexts to fan out across, or ’*’ for every context in the selected kubeconfig(s) (mutually exclusive with —context); each finding is stamped with cluster=<label> and the summary reports clusters=<n> |
--concurrency | int | 4 | maximum concurrent cluster executions when fanning out with —contexts or —kubeconfig-dir |
--google-auth | string | — | how Google Cloud and GKE DNS requests authenticate: auto (default: honors LOOKOUT_GOOGLE_AUTH, CORE_AGENT_GOOGLE_AUTH, MAST_GOOGLE_AUTH), adc, or injected (static placeholder bearer token, zero GCE metadata lookups) |
--exemptions | string | — | path to a git-reviewed exemption file (YAML); covered findings are ANNOTATED with their reason and expiry and counted as exempt=<n> in the summary, never dropped |
Finding kinds
Section titled “Finding kinds”Every kind= this command can emit, and the severities it carries them at. Nothing else appears in its output; a kind absent from a run means the check looked and found nothing. See the finding-kind glossary for the whole vocabulary.
| Kind | Severity | Claim |
|---|---|---|
event.warning | warning | one collapsed timeline entry for a Warning-type event family on a subject |
event.normal | info | one collapsed timeline entry for a Normal-type event family — context for the warnings around it, not a problem on its own |
event.hpa_thrash | warning | an HPA changed scale direction at least —hpa-flips times inside —hpa-window: the autoscaler is fighting itself |
read.unavailable | info | a resource this command reads was refused (RBAC forbidden, e.g. Nodes, Secrets or RBAC objects under the built-in view role) or is not served, so the checks that need it did not run and their silence is not a clean bill; everything else was still verified. The message names the refused verb and resource, whether it is cluster-scoped, whether the built-in view role grants it, and the grant that fixes it; resource= carries the refused resource as resource[.group] — an explicit degradation record, never silence |
Output fields
Section titled “Output fields”Beyond the shared envelope fields (kind, severity, namespace, kind_of_object, name, reason, message, fingerprint, exempt_reason, exempt_expires):
| Field | Meaning |
|---|---|
count | events collapsed into this timeline entry: k8s per-event repeat counts summed across the entry’s reason family |
first_seen | RFC3339 timestamp of the entry’s oldest activity |
last_seen | RFC3339 timestamp of the entry’s newest activity (the timeline sort key) |
source | reporting component (kubelet, horizontal-pod-autoscaler, …) |
variants | raw Event.Reason values collapsed into this entry, comma-separated (present only when a reason family merged more than one) |
objects | on a rolled-up entry (namespace and -A timelines): how many objects share this owner and reason; the name is then <owner>-* for pods (the owner their generated names encode) or * for Nodes, and the message is the newest member’s, prefixed with the count. A pod owner’s Normal start events (Scheduled, Pulling, Pulled, Created, Started) fold into one entry with reason PodsStarted, and its stop events (Killing, ScaleDown, Preempting) into PodsStopped, with the folded reasons in variants; Normal events on DaemonSets, ReplicaSets, Jobs and StatefulSets roll up across objects of the kind as * (their warnings stay per object); objects counts distinct objects |
examples | on a rolled-up entry: the newest member objects’ names, comma-separated (3; 5 for warnings); —per-object or —workload lists every object |
replicas | event.hpa_thrash: the chronological replica sequence recovered from SuccessfulRescale events, e.g. 2->6->2->6 |
flips | event.hpa_thrash: most scale-direction changes observed inside one —hpa-window |
window | event.hpa_thrash: the —hpa-window the flips were counted in |
target | event.hpa_thrash: the HPA’s scaleTargetRef as Kind/name (when the HPA object was readable) |
resource | read.unavailable: the resource that could not be read, as resource[.group] |
Output contract
Section titled “Output contract”Output: one finding per line (logfmt; —format=json for one JSON object
per line), keys in fixed order; healthy resources emit nothing. The final
line is always the summary: scanned=
Examples
Section titled “Examples”lookout triage events --workload=Deployment/prod/apilookout triage events --workload=Pod/prod/api-6d5f8c-x2v9k --since=30mlookout triage events --namespace=prodlookout triage events -A --since=2h --format=jsonlookout triage events --workload=Deployment/prod/api --hpa-window=15m --hpa-flips=4