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>
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
# NHSD Service Status Dashboard
|
||||
|
||||
A web-based status feed aggregator for the North Hills School District IT department. Provides a single-pane-of-glass view of vendor service health across 26 platforms, plus live WAN throughput graphs and FortiGate health monitoring.
|
||||
|
||||
## Features
|
||||
|
||||
- **Vendor status cards** — real-time health for all district platforms, color-coded and sortable by severity
|
||||
- **WAN throughput graphs** — live RX/TX graphs for Crown Castle and Comcast WAN links, pulled from the FortiGate API
|
||||
- **FortiGate health panel** — hostname, firmware version, uptime, CPU, and memory utilization
|
||||
- **Auto-refresh** — vendor status refreshes every 2 minutes; throughput every 30 seconds
|
||||
- **Glanceable design** — optimized for a wall-mounted monitor; status obvious from across the room
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Node.js** v18 or later
|
||||
- **Caddy** v2 — place `caddy.exe` in `bin/caddy/`
|
||||
- **NSSM** (optional, for running as Windows services) — place `nssm.exe` in `bin/nssm/`
|
||||
|
||||
## Setup
|
||||
|
||||
### 1. Install backend dependencies
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npm install
|
||||
```
|
||||
|
||||
### 2. Configure credentials
|
||||
|
||||
Copy the template and fill in your values:
|
||||
|
||||
```bash
|
||||
cp backend/.env.example backend/.env
|
||||
```
|
||||
|
||||
Edit `backend/.env`:
|
||||
|
||||
```env
|
||||
# Microsoft 365 — Azure AD app registration
|
||||
AZURE_TENANT_ID=your-tenant-id
|
||||
AZURE_CLIENT_ID=your-client-id
|
||||
AZURE_CLIENT_SECRET=your-client-secret
|
||||
|
||||
# FortiGate — WAN throughput and system health
|
||||
FORTIGATE_HOST=10.1.20.1
|
||||
FORTIGATE_API_TOKEN=your-api-token
|
||||
FORTIGATE_WAN1_INTERFACE=port25
|
||||
FORTIGATE_WAN1_LABEL=Crown Castle
|
||||
FORTIGATE_WAN2_INTERFACE=port8
|
||||
FORTIGATE_WAN2_LABEL=Comcast
|
||||
```
|
||||
|
||||
**Microsoft 365**: Create an app registration in Azure AD with `ServiceHealth.Read.All` permission (application, not delegated).
|
||||
|
||||
**FortiGate**: Create a read-only API token under **System → Administrators → Create New → REST API Admin**. Only Monitor access is required — no configuration access needed.
|
||||
|
||||
### 3. Start the backend
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npm start
|
||||
```
|
||||
|
||||
The backend listens on `http://localhost:3000`.
|
||||
|
||||
### 4. Start Caddy
|
||||
|
||||
```bash
|
||||
bin/caddy/caddy.exe run --config config/Caddyfile
|
||||
```
|
||||
|
||||
The dashboard is then available at `https://status.nhsd.net:8443`.
|
||||
|
||||
> **Note:** There is a separate, pre-existing Caddy instance on this machine. Always use the `--config config/Caddyfile` flag to target the dashboard Caddy specifically.
|
||||
|
||||
## Running as Windows Services (NSSM)
|
||||
|
||||
Use the helper scripts in `scripts/` to install the backend and Caddy as NSSM services so they start automatically with Windows.
|
||||
|
||||
## API Endpoints
|
||||
|
||||
| Endpoint | Description |
|
||||
|---|---|
|
||||
| `GET /api/status` | All vendor status (array) |
|
||||
| `GET /api/throughput` | WAN throughput history (array of 30-min data points) |
|
||||
| `GET /api/fortigate-health` | FortiGate hostname, version, uptime, CPU, memory |
|
||||
| `GET /api/health` | Backend liveness check |
|
||||
|
||||
## Adding a New Vendor
|
||||
|
||||
1. Create `backend/providers/<vendor>.js` exporting `name`, `url`, and `checkStatus()`
|
||||
2. Add it to `backend/providers/index.js`
|
||||
|
||||
See any existing provider for the expected return shape:
|
||||
|
||||
```js
|
||||
export const name = "Vendor Name";
|
||||
export const url = "https://status.vendor.com/";
|
||||
|
||||
export async function checkStatus() {
|
||||
// ...
|
||||
return {
|
||||
name,
|
||||
status, // "operational" | "degraded" | "outage" | "unknown"
|
||||
message, // short human-readable description
|
||||
lastUpdated: new Date().toISOString(),
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
If a vendor check throws, the backend catches it and returns `status: "unknown"` — the dashboard degrades gracefully.
|
||||
Reference in New Issue
Block a user