Repository navigation
feat: super console monitoring (alarms, events, logs) - #60
Merged
Merged
Conversation
…, logs - API watchdog checks the bot every 30 s; after ~2 minutes without answer it posts "bot unreachable" to a Discord webhook set in the super console (stored encrypted), and "bot restored" with the downtime when it is back. - InstanceEvent table: every status notice of the bot (startup, errors, servers added/removed/rejected, quotas) plus watchdog alarms, shown in the super console and kept 90 days. The bot can only insert. - Logs tab: latest bot and API log lines from in-memory, redacted buffers. Health-check requests are no longer logged at info level. - Docker json-file logs capped at 5 x 10 MB per service. - Public /health/bot for external uptime monitors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Brings Sentinel's super console on par with Muse for monitoring.
/healthzevery 30 s. After 4 failed checks (~2 min, longer than a deploy restart) it records an event and posts to a Discord webhook configured in Super console → Monitoring (encrypted at rest, never returned by the API). A second message reports the recovery and the downtime. A webhook is used because the bot cannot report its own outage.InstanceEventtable. Every bot status notice (startup, client errors and warnings, servers added/removed/rejected, quotas, cleanup) is recorded even without a status channel; watchdog alarms too. Encrypted details, 90-day retention. Grants: bot INSERT only (createMany, no RETURNING), API full; CI privilege checks extended.json-file, 5 × 10 MB) in both Compose files — needs the prod Compose file reinstalled on the VPS./health/bot(public, no details) for an external uptime monitor.How it was tested
CI: typecheck, tests (new log buffer test), migrations + drift check, DB privilege checks, Compose validation.
🤖 Generated with Claude Code