Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

OceanBase Diagnostic Tool (obdiag)

$ obdiag Official Low Risk
OceanBase · Database & Data · MulanPSL-2.0 · linux / macos

obdiag (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.

FCRS-1.0 Score
75 /100
Good
Medium Confidence
Zero-Friction Install
https://github.com/oceanbase/obdiag/releases
CLI vs MCP Decision CLI Preferred vs MCP

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

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

Supports obdiag check run JSON/YAML report exports and non-interactive scenario flags (--scene), though gather and display outputs vary.

  • obdiag check run supports Table, JSON, YAML, and HTML reports
Trust & Safety 18 / 25

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
Setup & Portability 11 / 15

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
Utility & Efficiency 13 / 15

Automates multi-node gather, check, analyze, rca, and display workflows that would otherwise require manual SSH across OBServer nodes.

  • Covers check, gather, analyze, rca, and display across cluster nodes
Maintenance & Lineage 8 / 10

Official oceanbase/obdiag repository maintained by OceanBase under MulanPSL-2.0.

  • Official oceanbase/obdiag repo under MulanPSL-2.0
Docs & Verifiability 7 / 10

Detailed Chinese documentation on oceanbase.com and subcommand --help, with lighter English coverage.

  • Official OceanBase diagnostic docs and --help guides

Security, Auth & Guardrails

Auth Modes
Config File
Credential Storage

Stores OceanBase sys tenant credentials and node SSH config in ~/.obdiag/config.yml via obdiag config.

Side Effects
Read-Only Local Write
Cost & Quotas

Open-source and free (MulanPSL-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List available OceanBase diagnostic check suites
obdiag check list

Displays available cluster and OBProxy inspection packages.

Run cluster health check with JSON report
obdiag check run --report_type=json

Inspects kernel settings, internal tables, and error states, emitting a JSON diagnostic report.

Controlled Writes & Previews

Gather logs for a high-CPU diagnostic scenario
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, and rca across distributed OceanBase nodes.
  • + obdiag check run supports 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.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI