Skip to content

check: nine-domain health patrol

Run a bounded read-only nine-domain health check and export a self-contained offline HTML report.

Patrols nine bounded domains in one connection (connections, license, disk, replication, slots, archive, freeze, locks, txn) without scanning user table sizes. Read-only: never modifies sessions, parameters, or objects.

Usage

kbdiag check
kbdiag check --json
kbdiag check --html ./patrol.html
kbdiag check --html ./patrol.html --html-raw-sql

Key Options

OptionEffect
--html <file>Write a static offline HTML report atomically (0600, strict CSP, no scripts/CDNs)
--html-raw-sqlOpt in to raw SQL inside HTML (default redacts SQL columns/fields to <redacted>)
--jsonEmit check.domains matrix plus all 16 domain probes and redacted[] metadata

Verdict & Reading Output

  • FAIL (exit=2) / WARN (exit=1): Any domain triggers a rule finding; [NEXT] prioritizes FAIL then WARN drilldowns ahead of missing-coverage items so confirmed incidents are never crowded out.
  • UNKNOWN (exit=3): Missing/skipped/error/redacted coverage without a higher-severity finding; failed/skipped probes are listed in top [COVERAGE] and affected domains are summarized under [SUMMARY] (Missing domains) and wrapped cleanly inside [DOMAIN MATRIX].
  • --html security: Zero JavaScript/external resources (script-src 'none'); HTML preserves non-SQL cells alongside <redacted> SQL placeholders and renders redacted[] privilege gaps.

Example (KES V9 Primary, excerpt, COLUMNS=80)

check  UNKNOWN  (KingbaseES V009R002C016, primary, system@local,
    endpoint=/tmp/.s.KINGBASE.54321, 2026-12-03T04:17:23Z)

[COVERAGE]
  space.disk: skipped (insufficient_privilege: statfs
    /data/kingbase/data/sys_wal: permission denied)

[SUMMARY]
  0 FAIL, 0 WARN | covered 8/9 | missing 1
  Missing domains: disk

[DOMAIN MATRIX]
  DOMAIN | STATUS | VERDICT | SUMMARY | DRILLDOWN
  connections | ok | OK | within collected thresholds | kbdiag session
  license | ok | OK | within collected thresholds | kbdiag server license
  disk | skipped | UNKNOWN
    incomplete evidence; missing: space.disk=skipped
    kbdiag space
  ...
  txn | ok | OK | within collected thresholds | kbdiag txn

[NEXT]
  kbdiag space  # disk: inspect findings or restore coverage