From 035d23d1e3d9681395da967230a7cb37d57f544a Mon Sep 17 00:00:00 2001 From: FoggyMtnDrifter Date: Sun, 22 Nov 2026 23:50:58 -0500 Subject: [PATCH] Check apps in US East through the status canary (#4) --- README.md | 2 +- uptime.config.ts | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 9ce7dd1..afb67af 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Without a D1 database, `npm run dev` shows sample data (`dev/sample.ts`). Add `? Live at status.cottage.host. A push to `main` deploys it through the "Deploy to Cloudflare" workflow, which runs only while the repository variable `CLOUDFLARE_DEPLOY` is `true`. It uses the Actions secrets `CLOUDFLARE_API_TOKEN` (Workers Scripts, D1 and Cloudflare Pages edit on the Cottage account) and `CLOUDFLARE_ACCOUNT_ID`. -The "Apps in US East" check is commented out in `uptime.config.ts` until a canary app runs on the node. Once one does, put its address in the `apps-us-east` monitor and uncomment it and its group. +The "Apps in US East" check loads the health endpoint of a status canary: a small ntfy app Cottage runs on its own (internal, unbilled) account on the Virginia servers. A new region gets its own canary and monitor. Cottage's footer status ("All systems normal") can read `/api/data`, which returns the current state as JSON. diff --git a/uptime.config.ts b/uptime.config.ts index af5407a..9ebabc0 100644 --- a/uptime.config.ts +++ b/uptime.config.ts @@ -14,7 +14,7 @@ const pageConfig: PageConfig = { // Sections, in order. Every monitor below should appear in exactly one. group: { Cottage: ['website', 'dashboard'], - // 'Apps by region': ['apps-us-east'], // add back with the monitor below + 'Apps by region': ['apps-us-east'], }, } @@ -42,20 +42,19 @@ const workerConfig: WorkerConfig = { timeout: 10000, headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' }, }, - // Not checked yet: no canary app runs on the node. Deploy one, then uncomment this - // and the 'Apps by region' group above. - // { - // // A small app Cottage runs for itself on the region's servers, so this checks the - // // whole path a customer's app takes: Cloudflare, the node's proxy and a running app. - // // TODO at launch: deploy the canary app and put its address here. - // id: 'apps-us-east', - // name: 'Apps in US East', - // tooltip: 'Customer apps hosted in Virginia', - // method: 'GET', - // target: 'https://status-canary-vin1.cottagehost.com/', - // timeout: 10000, - // headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' }, - // }, + { + // A small app Cottage runs for itself on the region's servers (ntfy, "Status canary" on + // Cottage's own internal account), so this checks the whole path a customer's app takes: + // Cloudflare, the node's proxy, Harbor and a running container. + id: 'apps-us-east', + name: 'Apps in US East', + tooltip: 'Customer apps hosted in Virginia', + method: 'GET', + target: 'https://status-canary-m7ec.cottagehost.com/v1/health', + expectedCodes: [200], + timeout: 10000, + headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' }, + }, ], // Alerts come from Grafana Cloud (hearth infra/monitoring). A webhook here could page too. }