homelab-audit.sh: Dynamic summary and --hosts filter #24
Labels
No Label
ai-changes-requested
ai-failed
ai-pr-opened
ai-reviewed
ai-reviewing
ai-working
infra-audit
monitoring
operations
proxmox
script
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/claude-home#24
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
SRE review noted the audit script's summary section prints static hardcoded recommendations regardless of actual findings, and the script has no way to target specific hosts for post-fix validation.
Improvements
1. Dynamic summary driven by actual findings
The
generate_summaryfunction currently prints a generic checklist. It should instead:parse_and_reportin anISSUES_FOUNDarray (or temp file)2. --hosts filter flag
--hosts vm-116,manticoreargument to run the audit against specific hosts only--hostsis specified (unlessproxmoxis in the list)homelab-audit.sh --hosts vm-115-docker-sba,manticore3. Machine-readable output option
--jsonflag is accepted but not implemented — consider outputting a JSON summary alongside the text reportfindings.jsonin$REPORT_DIRwould be useful for n8n integrationFiles
monitoring/scripts/homelab-audit.shLabels
infra-audit,scriptPR #38 opened: #38
Approach:
--hosts vm-116,manticore: bypasses Proxmox inventory, SSHes directly to each named host; skips backup-recency check unlessproxmoxis listedgenerate_summaryusing the newAUDITED_HOSTSglobal array; only rows with at least one finding are printed--jsonnow writes$REPORT_DIR/findings.jsonvia a Python inline heredoc — structured for n8n ingestionTotal: X warning(s), Y critical across Z host(s)line added at end of summary