Skip to content

kx diagnostic

Analyses health signals — replica counts, container states, resource usage and warning events — and reports findings by severity.

With no index, sweeps every workload in the current namespace, or in the namespace given by -n, or in every namespace with -A. Healthy resources are left out of the terminal table by default; --full includes them. The HTML report (--html) always includes them.

A Node is diagnosed by index only — from kx get nodes or kx top nodes. Nodes are not namespaced, so they do not appear in a namespace sweep or in -A.

Usage

kx diagnostic [OPTIONS] [index]

Aliases

kx diag

Arguments

ArgumentDescription
[index]Row number from the current listing; run kx state to see it

Options

OptionDescription
-A, --all-namespacesSweep every namespace; each row is indexed and carries its own namespace
--fail-on stringExit 2 when a verdict reaches this severity or worse (critical, warning)
--fullInclude healthy resources in the terminal table; the HTML report always includes them
--htmlRender the report as HTML and serve it in a browser
--jsonPrint the report as JSON instead of a table
-n, --namespace stringNamespace to sweep; defaults to the current namespace
--no-openServe the HTML report without opening a browser
--out stringWrite the HTML report to this file instead of serving it in a browser
--port intPort to serve the HTML report on; 0 picks a free one

Global options

OptionDescription
--no-colorDisable styled output
-h, --helpShow this message and exit

Examples

kx diagnostic
kx diagnostic 1
kx diagnostic -n prod
kx diagnostic -A
kx diagnostic --html
kx diagnostic -A --json
kx diagnostic -A --fail-on critical --out report.html