Add a weekly digest and report which version of the agent each server runs
- Weekly digest through the notification channels: alerts now, a week of uptime, what happened, disks heading for full, expiring secrets and domains, updates waiting, planned maintenance. Off until switched on in Settings -> Notifications; Preview and Send it now there. Setting key 'digest'. - Agents say their version in every report (Linux and Windows scripts are version 2); the server compares it with the scripts it serves and marks agents that are behind on the Servers, server and Updates pages. servers.agent_version, migration 0026. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3da5c639b1
commit
aa94d84f6c
28 files changed
+3179
-19
No files matched your search
@@ -65,6 +65,11 @@ const reportSchema = z.object({
|
||||
hostname: text(255).optional(),
|
||||
os_type: text(50).optional(),
|
||||
reported_at: text(50).optional(),
|
||||
// Lenient like the rest: a number that makes no sense is dropped, never allowed to cost the agent its report.
|
||||
agent_version: z
|
||||
.unknown()
|
||||
.optional()
|
||||
.transform((v) => (typeof v === "number" && Number.isInteger(v) && v >= 1 && v <= 100_000 ? v : undefined)),
|
||||
system: systemSchema.nullable().optional(),
|
||||
tasks: z
|
||||
.array(
|
||||
@@ -111,6 +116,7 @@ agentReportRouter.post("/", asyncHandler(authenticateAgent), express.json({ limi
|
||||
await syncServerTasks(server.id, {
|
||||
hostname: parsed.data.hostname,
|
||||
osType: parsed.data.os_type,
|
||||
agentVersion: parsed.data.agent_version,
|
||||
system: parsed.data.system,
|
||||
tasks: parsed.data.tasks.map((t) => ({
|
||||
scheduleType: t.schedule_type,
|
||||
|
||||
Reference in new issue
Block a user