Files
Klein 51eb3bf7c8 Implement all vendor integrations, WAN graphs, and FortiGate health panel
- Wire up 26 vendor providers: Atlassian Statuspage API, Status.io, Instatus,
  AWS RSS feeds, Apple/Google JSON feeds, M365 Graph API, and synthetic checks
- Add 11 new providers: AWS, Cloudflare, SmartPass, School Dismissal Manager,
  SherpaDesk, Classkick, ClassDojo, Savvas, Study Island, Promethean, RAZ-Kids
- Rename Local Infrastructure → Internet (TCP check to 8.8.8.8:53)
- Add WAN throughput graph section: dual-link canvas graphs (Crown Castle +
  Comcast) polling FortiGate REST API every 30s with 30-min rolling history
- Add FortiGate health card: uptime, CPU %, memory % from FortiOS API
- Add /api/throughput and /api/fortigate-health endpoints
- Add README with setup instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-20 13:46:13 -05:00

63 lines
1.7 KiB
JavaScript

export const name = "SchoolMessenger";
export const url = "https://status.powerschool.com/";
// SchoolMessenger was acquired by PowerSchool and lives on their status page
// as a group of components. We filter specifically for those rather than
// duplicating the overall PowerSchool check.
const COMPONENTS_URL =
"https://status.powerschool.com/api/v2/components.json";
// Atlassian component status → dashboard status
const STATUS_MAP = {
operational: "operational",
under_maintenance: "degraded",
degraded_performance: "degraded",
partial_outage: "degraded",
major_outage: "outage",
};
const SEVERITY_ORDER = ["operational", "degraded", "outage"];
function worstStatus(a, b) {
return SEVERITY_ORDER.indexOf(a) >= SEVERITY_ORDER.indexOf(b) ? a : b;
}
export async function checkStatus() {
const res = await fetch(COMPONENTS_URL);
if (!res.ok) {
throw new Error(`SchoolMessenger status request failed (${res.status})`);
}
const data = await res.json();
const components = (data.components ?? []).filter((c) =>
c.name.startsWith("SchoolMessenger")
);
if (components.length === 0) {
throw new Error("No SchoolMessenger components found on status page");
}
let overall = "operational";
const issues = [];
for (const c of components) {
const mapped = STATUS_MAP[c.status] ?? "unknown";
overall = worstStatus(overall, mapped);
if (mapped !== "operational") {
issues.push(`${c.name}: ${c.status.replace(/_/g, " ")}`);
}
}
const message =
issues.length > 0 ? issues.join(" | ") : "All services operational.";
return {
name,
status: overall,
message,
lastUpdated: new Date().toISOString(),
};
}