inno audit

Audit a MySQL data directory for integrity, health, or corruption.

Usage

# Default: integrity check (checksum validation)
inno audit -d /var/lib/mysql

# Health mode: per-tablespace metrics
inno audit -d /var/lib/mysql --health

# Checksum mismatch mode: list only corrupt pages
inno audit -d /var/lib/mysql --checksum-mismatch

# Filter unhealthy tablespaces
inno audit -d /var/lib/mysql --health --min-fill-factor 50

# JSON output
inno audit -d /var/lib/mysql --json

# Prometheus metrics
inno audit -d /var/lib/mysql --health --prometheus

Options

OptionDescription
-d, --datadirMySQL data directory path
--healthShow per-tablespace health metrics
--checksum-mismatchList only pages with checksum mismatches
-v, --verboseShow additional details
--jsonOutput in JSON format
--prometheusOutput in Prometheus exposition format
--page-sizeOverride page size
--keyringPath to MySQL keyring file
--min-fill-factorFilter: show tables with fill factor below threshold (0-100)
--max-fragmentationFilter: show tables with fragmentation above threshold (0-100)
--bloatEnable bloat scoring in health mode
--max-bloat-gradeFilter: show tables with worst bloat grade at or worse than threshold (A-F)
--depthMaximum directory recursion depth (default: 2, 0 = unlimited)

Modes

Integrity Mode (default)

Validates checksums across all tablespace files. Reports per-file pass/fail with a directory-wide integrity percentage.

Health Mode

Computes per-tablespace fill factor, fragmentation, and garbage ratio, ranked worst-first. Use threshold filters to focus on unhealthy tablespaces.

Bloat Alerts

Use --bloat with health mode to compute per-tablespace bloat scores and grades:

inno audit -d /var/lib/mysql --health --bloat
inno audit -d /var/lib/mysql --health --max-bloat-grade C --json

The --max-bloat-grade flag filters to tables at or worse than the given grade (A through F). It implies --bloat. See the Bloat Scoring guide for grade definitions.

Checksum Mismatch Mode

Compact listing of only corrupt pages with stored vs. calculated checksums. Suitable for piping to inno repair.