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
| Argument | Description |
|---|---|
[index] | Row number from the current listing; run kx state to see it |
Options
| Option | Description |
|---|---|
-A, --all-namespaces | Sweep every namespace; each row is indexed and carries its own namespace |
--fail-on string | Exit 2 when a verdict reaches this severity or worse (critical, warning) |
--full | Include healthy resources in the terminal table; the HTML report always includes them |
--html | Render the report as HTML and serve it in a browser |
--json | Print the report as JSON instead of a table |
-n, --namespace string | Namespace to sweep; defaults to the current namespace |
--no-open | Serve the HTML report without opening a browser |
--out string | Write the HTML report to this file instead of serving it in a browser |
--port int | Port to serve the HTML report on; 0 picks a free one |
Global options
| Option | Description |
|---|---|
--no-color | Disable styled output |
-h, --help | Show 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