Usage#
check_multi runs a single check against every device in an inventory
file, in parallel, and writes structured results.
check_multi [OPTIONS] <check_name> <inventory_file>
Options#
| Option | Description | Default |
|---|---|---|
-h, --help |
Show help and exit | β |
-d, --dry-run |
Never open SSH connections; print what would run | off |
-v, --verbose |
Debug logging | off |
-t, --threads <N> |
Maximum parallel SSH sessions (positive integer) | 12 (or config) |
-o, --output-dir <DIR> |
Results directory | results/<ts>_<check> |
-e, --env <name> |
Environment profile (config/environments/<name>.yaml) |
lab |
-c, --config <FILE> |
Alternate defaults.yaml |
bundled defaults |
-u, --user <USER> |
SSH username | current user |
-p, --password |
Password auth via sshpass (discouraged) |
off |
-y, --yes |
Assume "yes" for confirmation prompts (unattended runs) | off |
--excel |
Also generate an executive Excel report | off |
--no-color |
Disable coloured output (also honours NO_COLOR) |
off |
--list-checks |
Print available check modules and exit | β |
--version |
Print version and exit | β |
Argument precedence#
Configuration is resolved in this order (later wins):
- Built-in defaults
config/defaults.yaml(or--config)config/environments/<env>.yaml- Command-line flags β an explicit flag such as
-talways wins.
Safety behaviours#
These exist to prevent common operator mistakes:
- Fast validation. Thread count, check name, inventory existence and the environment profile are validated before any connection is attempted.
- "Did you mean�" A mistyped check name suggests close matches and points
to
--list-checks. - High-impact confirmation. A real (non-dry-run) execution against the
prodprofile or a large inventory (β₯ 50 devices) prompts for confirmation. Pass-y/--yesfor unattended runs; on a non-interactive shell the run aborts unless--yesis given. - Path-safe check names. Check names are restricted to
[A-Za-z0-9_-].
Exit codes#
| Code | Meaning |
|---|---|
0 |
Success β all device checks passed |
1 |
Usage or configuration error |
4 |
One or more device checks failed |
Examples#
# Safe preview β no SSH, populated summary.json
check_multi --dry-run platform examples/devices.txt
# Lab run, 10 threads, with an Excel report
check_multi -e lab -t 10 --excel platform examples/devices.txt
# Production certificate audit, unattended
check_multi -e prod --yes certs inventory/prod.txt
# Discover available checks
check_multi --list-checks
Output layout#
results/YYYYMMDD_HHMMSS_<check>/
βββ audit/run_*.json # immutable per-run audit record
βββ summary.json # structured results (devices, counts, rate)
βββ Device_Audit_Report_*.xlsx # only with --excel
See Configuration for tuning and Troubleshooting for common issues.