feat(bin): add collect_debug.sh for debugging faulty installations - #3077
Merged
Conversation
Add a read-only diagnostics collector that bundles everything needed to debug a faulty Anthias install into a single, shareable archive: host and hardware info, Docker + compose state, per-container logs and inspect (restart counts, OOM, exit codes), the kernel ring buffer, the Anthias config and database overview, an ffprobe of every video asset, network reachability, Redis health, and Raspberry Pi specifics (throttling, temperature). A final pass redacts PII from every file before archiving — IP/MAC addresses, emails, URL-embedded credentials, the device hostname, and anthias.conf secrets — while preserving non-identifying constants (127.0.0.1, 0.0.0.0) so bind/route lines stay readable. Video assets are enumerated straight from the live ORM and probed with ffprobe inside the server/celery image (mirroring processing.py), so "video won't play" reports come with codec/container detail and no host ffmpeg dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Issues Fixed
Not associated with a specific issue. Adds a self-contained diagnostics collector so users reporting a broken install (and maintainers triaging on the forum / GitHub) can attach one redacted archive instead of being walked through a dozen manual commands.
Description
Adds
bin/collect_debug.sh— a read-only diagnostics collector that bundles everything needed to debug a faulty Anthias install into a single, shareable.tar.gz. It is safe to run on a live device and never touches the running stack.Collected into one report:
vcgencmd get_throttled), temperature, firmware,config.txt.compose ps, resolvedcompose config, livestats.OOMKilled, exit codes, errors (the usual crash-loop culprits).dmesg. Tries compose logs, then journald-by-tag (production driver), thendocker logs.anthias.confwith secrets blanked, DB integrity check, journal mode, asset counts/inventory, assets dir size.ffprobeinside the server/celery image (mirroringprocessing.py), so "video won't play" reports arrive with codec/container detail and no host ffmpeg dependency.PING/INFO.A final pass redacts PII from every file before archiving — IP/MAC addresses, emails, URL-embedded credentials, the device hostname, and
anthias.confsecrets — while preserving non-identifying constants (127.0.0.1,0.0.0.0) so bind/route lines stay readable. The IPv6 rule requires ≥5 hex groups so it can't eat log timestamps.Usage:
bin/collect_debug.sh [--output DIR] [--lines N] [--no-archive]Validated end-to-end on the x86 testbed (full integrated stack, all 4 containers up): seeded a temporary video asset, ran the script on-device, confirmed ffprobe returned clean JSON via the live ORM enumeration, and verified the device's real IP/MAC/hostname were fully redacted (0 leaks) while loopback constants were preserved. All test artifacts were removed afterward.
Checklist
shellcheckandbash -n.)🤖 Generated with Claude Code