πŸ›‘οΈ check_multiEnterprise Device Audit Framework
GitHub β†—

Architecture – check_multi 2.0#

Design Goals#

  • Modular, testable, and extensible
  • Secure by default (keys preferred, temp files locked down)
  • Clear separation of execution vs reporting
  • Governance-ready (audit trail, environment profiles)
  • Operator-friendly CLI with dry-run and Excel output

High-Level Flow#

CLI (bin/check_multi)
    β”‚
    β”œβ”€ load config + environment profile
    β”œβ”€ load check plugin
    β”œβ”€ validate inventory
    β”œβ”€ start audit run
    β”‚
    β”œβ”€ parallel execution (lib/parallel.sh)
    β”‚     └─ ssh_exec (lib/ssh.sh) β†’ run_check()
    β”‚
    β”œβ”€ generate summary.json (lib/summary.sh)
    β”œβ”€ optional Excel report (scripts/generate_excel_report.py)
    └─ end audit run

Key Modules#

Module Responsibility
lib/common.sh Logging, colours, temp files, JSON escape
lib/ssh.sh SSH with retries, timeouts, dry-run, password warning
lib/inventory.sh Load + validate device lists
lib/parallel.sh Controlled concurrency
lib/config.sh YAML defaults + environment overlays
lib/audit.sh Immutable run records
lib/summary.sh Structured summary.json for reporters
lib/checks/*.sh Plugin check implementations

Plugin Contract#

Every check module must define:

run_check() {
  local device=$1
  # perform work, return 0 on success, non-zero on failure
}

Output Layout#

results/YYYYMMDD_HHMMSS_<check>/
β”œβ”€β”€ audit/
β”‚   └── run_*.json
β”œβ”€β”€ summary.json
└── Device_Audit_Report_*.xlsx   # when --excel used

Extension Points#

  • Add new checks by dropping a file in lib/checks/
  • Override behaviour via config/environments/*.yaml
  • Replace the Excel reporter or add additional reporters that consume summary.json