Heartbeats, Coming up and suggested checks; Operations menu tidied
Heartbeats: a cron job or script calls /api/heartbeat/<token> (and /start, /fail); the app alerts when the call is late or the job says it failed. Coming up: one agenda of everything dated (expiries, warranties, end of support, planned and recurring maintenance, restore tests, waiting updates), with a dashboard card and an iCalendar feed behind a share link. Suggested checks: web ports and certificates the app already knows about, added with a click. Menu: Incidents become Alerts -> History (old /incidents links redirect); new Monitoring group (Endpoints, Heartbeats, Uptime Kuma); osTicket under Automation, Admin Links under Infrastructure, Generator under Administration. Also makes the restore-test metrics test follow the real clock. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c05c847d17
commit
4e0c6927b2
44 files changed
+7092
-75
No files matched your search
@@ -48,6 +48,10 @@ import { mapRouter } from "./routes/map.js";
|
||||
import { generatorRouter } from "./routes/generator.js";
|
||||
import { alertTicketsRouter } from "./routes/alertTickets.js";
|
||||
import { avatarsRouter } from "./routes/avatars.js";
|
||||
import { heartbeatsRouter } from "./routes/heartbeats.js";
|
||||
import { agendaRouter } from "./routes/agenda.js";
|
||||
import { publicCalendarRouter } from "./routes/publicCalendar.js";
|
||||
import { heartbeatPingRouter } from "./routes/heartbeatPing.js";
|
||||
import { apiErrorHandler } from "./utils/apiErrorHandler.js";
|
||||
import { securityHeaders } from "./utils/securityHeaders.js";
|
||||
import { sameOriginGuard } from "./utils/sameOriginGuard.js";
|
||||
@@ -72,6 +76,8 @@ export function createApp() {
|
||||
// The agent endpoint comes first: it reads its own (larger) body, only after checking the token, and an agent has no use for a
|
||||
// session. It is also the one place a request isn't from a browser, so it isn't subject to the same-origin check below.
|
||||
app.use("/api/agent/report", agentReportRouter);
|
||||
// A job reporting that it ran: a token in the address, no session, and no browser to be checked for where it came from.
|
||||
app.use("/api/heartbeat", heartbeatPingRouter);
|
||||
// Everything after this is reached with a session cookie, so a request that came from another origin is refused here.
|
||||
app.use(sameOriginGuard);
|
||||
app.use(express.json());
|
||||
@@ -105,6 +111,8 @@ export function createApp() {
|
||||
app.use("/auth", authRouter);
|
||||
app.use("/api/me", meRouter);
|
||||
app.use("/api/avatars", avatarsRouter);
|
||||
app.use("/api/heartbeats", heartbeatsRouter);
|
||||
app.use("/api/agenda", agendaRouter);
|
||||
app.use("/api/uptime", uptimeRouter);
|
||||
app.use("/api/share-links", shareLinksRouter);
|
||||
app.use("/api/runbooks", runbooksRouter);
|
||||
@@ -123,6 +131,7 @@ export function createApp() {
|
||||
app.use("/metrics", metricsRouter);
|
||||
app.use("/api/public/wall", publicWallRouter);
|
||||
app.use("/api/public/status", publicStatusRouter);
|
||||
app.use("/api/public/calendar", publicCalendarRouter);
|
||||
app.use("/api/users", usersRouter);
|
||||
app.use("/api/audit-log", auditLogRouter);
|
||||
app.use("/api/diag-log", diagLogRouter);
|
||||
|
||||
Reference in new issue
Block a user