Acknowledge and hand over alerts, incident timelines, and built-in database backups
- Alerts can be acknowledged (note, assignee, duration); acknowledged alerts are left out of what needs attention (sidebar, dashboard strip, cards) but stay raised and counted by /metrics - Incidents: each time an alert is raised and goes away is recorded (alert_acks, alert_incidents, incident_notes, migration 0032), with a timeline of acks, maintenance, changes, update runs, related alerts and notes; Incidents page and a digest section - Backups of Homelab Manager's own database: daily checked VACUUM INTO copies, retention, download, check, upload, delete, and restore staged and applied at start-up before the database opens (pre-restore copy kept); alerts and /metrics for stale or failing backups - Docs: README, BACKUP, DATABASE, NOTIFICATIONS, ROLES, API; tests Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7a5b623444
commit
2744a84719
41 files changed
+6573
-26
No files matched your search
@@ -1,4 +1,6 @@
|
||||
import "./loadEnv.js";
|
||||
// Before anything opens the database: puts a restore that was staged from Settings → Backup in place.
|
||||
import "./db/applyRestore.js";
|
||||
import { env, warnIfAuthNotConfigured, checkSessionSecret } from "./env.js";
|
||||
import { createApp } from "./app.js";
|
||||
import { runMigrations } from "./db/migrate.js";
|
||||
@@ -17,6 +19,9 @@ import { initAlertTicketScheduler } from "./services/alertTicketScheduler.js";
|
||||
import { initKumaMaintenanceScheduler } from "./services/kumaMaintenanceScheduler.js";
|
||||
import { initMaintenanceScheduleScheduler } from "./services/maintenanceScheduleScheduler.js";
|
||||
import { initUpdateRuns } from "./services/updateRuns.js";
|
||||
import { initSelfBackupScheduler } from "./services/selfBackupScheduler.js";
|
||||
import { initIncidentRecorder } from "./services/incidents.js";
|
||||
import { getAlerts } from "./services/alerts.js";
|
||||
|
||||
{
|
||||
// Sessions are signed with this secret. Without one, the app would sign them with a value that's in the source code.
|
||||
@@ -50,6 +55,8 @@ await initAlertTicketScheduler();
|
||||
await initKumaMaintenanceScheduler();
|
||||
await initMaintenanceScheduleScheduler();
|
||||
initUpdateRuns();
|
||||
await initSelfBackupScheduler();
|
||||
initIncidentRecorder(() => getAlerts(false));
|
||||
|
||||
createApp().listen(env.port, () => {
|
||||
console.log(`homelab-manager listening on port ${env.port}`);
|
||||
|
||||
Reference in new issue
Block a user