diff --git a/README.md b/README.md index ce59942..28d3006 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,15 @@ # NetWatch -Real-time network latency monitor SPA designed to be served from a static bucket. +Real-time network latency monitor SPA designed to be served from a static bucket or Docker container. ## Features -- **Real-time monitoring**: Updates every 250ms -- **10 monitored hosts**: Google Cloud, AWS, GitHub, Cloudflare, Azure, DigitalOcean, Fastly, Akamai, local gateway (192.168.100.1), and datavi.be -- **Visual latency display**: Large color-coded latency figures (NNNms format) -- **Sparkline graphs**: 300-second history visualization for each host +- **Real-time monitoring**: Updates every 2s with 300s history sparklines +- **9 WAN hosts**: Google Cloud, AWS, GitHub, Cloudflare, Azure, DigitalOcean, Fastly, Akamai, datavi.be +- **Local network group**: Local gateway (192.168.100.1) tracked separately +- **Health indicator**: Overall status box — green (HEALTHY) or red (DEGRADED) based on WAN reachability +- **Summary stats**: Reachable count, min/max/avg latency across WAN hosts only +- **Visual latency display**: Large color-coded figures with canvas sparkline graphs - **Color coding**: - Green: <50ms (excellent) - Lime: <100ms (good) @@ -15,6 +17,10 @@ Real-time network latency monitor SPA designed to be served from a static bucket - Orange: <500ms (poor) - Red: >500ms (bad) - Gray: offline/unreachable +- **Fixed chart axes**: Y-axis 0–1000ms, X-axis 0–300s +- **Play/pause**: Pause stops probes but history keeps scrolling (blank gaps, no false outage) +- **Clickable URLs**: Service URLs open in new tabs +- **>1000ms clamped**: Anything over 1s is treated as unreachable - **Zero runtime dependencies**: All resources bundled into build artifacts - **IPv4 only**: Designed for IPv4 connectivity testing @@ -22,9 +28,10 @@ Real-time network latency monitor SPA designed to be served from a static bucket - Latency measured via HEAD requests with cache-busting - Uses `mode: 'no-cors'` to allow cross-origin requests where CORS headers aren't present -- 5-second timeout for unresponsive hosts -- Canvas-based sparkline rendering +- 1-second timeout for unresponsive hosts (>1000ms clamped to unreachable) +- Canvas-based sparkline rendering with fixed axes - Tailwind CSS v4 for styling +- Local gateway excluded from WAN summary statistics ## Build @@ -42,6 +49,18 @@ yarn build yarn preview ``` +## Docker + +```bash +docker build -t netwatch . +docker run -p 8080:80 netwatch +``` + +The nginx config: +- Trusts `X-Forwarded-For` from RFC1918 reverse proxies (10/8, 172.16/12, 192.168/16) +- Access log goes to stdout +- Static assets cached with immutable headers + ## Deployment After running `yarn build`, deploy the contents of the `dist/` directory to any static file host: @@ -53,6 +72,8 @@ After running `yarn build`, deploy the contents of the `dist/` directory to any - Netlify - GitHub Pages +Or use the Docker image behind a reverse proxy. + ## Output Structure ```