OceanBase Diagnostic Tool (obdiag)
$ obdiag Official Low Riskobdiag (OceanBase Diagnostic Tool) is OceanBase's official MulanPSL-2.0 Python CLI for diagnosing distributed OceanBase and OBProxy clusters. It provides obdiag check (supporting JSON/YAML/table reports), obdiag gather with log desensitization, obdiag analyze, obdiag rca, and real-time obdiag display.
https://github.com/oceanbase/obdiag/releases obdiag collects multi-node observer logs, flame graphs, and RCA reports locally from distributed cluster hosts without exposing raw node SSH to MCP.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports obdiag check run JSON/YAML report exports and non-interactive scenario flags (--scene), though gather and display outputs vary.
obdiag check runsupports Table, JSON, YAML, and HTML reports
Primarily read-only against database nodes and supports log desensitization during gather, though ~/.obdiag/config.yml stores sys tenant credentials and SSH access.
- Read-only cluster diagnostics with built-in log desensitization
Python-based tool typically deployed via OceanBase RPM/Yum repos or obd cluster obdiag install on Linux ops hosts.
- Packaged for Linux RPM/OBD and Python environments
Automates multi-node gather, check, analyze, rca, and display workflows that would otherwise require manual SSH across OBServer nodes.
- Covers
check,gather,analyze,rca, anddisplayacross cluster nodes
Official oceanbase/obdiag repository maintained by OceanBase under MulanPSL-2.0.
- Official
oceanbase/obdiagrepo under MulanPSL-2.0
Detailed Chinese documentation on oceanbase.com and subcommand --help, with lighter English coverage.
- Official OceanBase diagnostic docs and
--helpguides
Security, Auth & Guardrails
Stores OceanBase sys tenant credentials and node SSH config in ~/.obdiag/config.yml via obdiag config.
Open-source and free (MulanPSL-2.0).
# obdiag Agent Rules - Verify `~/.obdiag/config.yml` targets the intended cluster before running `obdiag check` or `gather`. - Use bounded `--since` / `--from` / `--to` windows when running `obdiag gather log` on large clusters. - Keep log desensitization enabled when sharing gathered diagnostic bundles externally.
Agent-Ready Command Recipes
Safe Read-Only Queries
obdiag check list
Displays available cluster and OBProxy inspection packages.
obdiag check run --report_type=json
Inspects kernel settings, internal tables, and error states, emitting a JSON diagnostic report.
Controlled Writes & Previews
obdiag gather scene run --scene=observer.cpu_high
Collects targeted diagnostic bundles into a local archive directory without mutating database state.
Strengths for Agents
- + One-command
check,gather,analyze, andrcaacross distributed OceanBase nodes. - +
obdiag check runsupports structured JSON and YAML diagnostic reports. - + Built-in log desensitization reduces sensitive data exposure in troubleshooting bundles.
Caveats & Pitfalls
- ! Primarily packaged for Linux RPM/OBD operations hosts rather than Homebrew or PyPI.
- ! Documentation is predominantly in Chinese.