Data health alerts
LiveAnalytics should speak up the day your page beacon breaks, not three weeks later when you check a chart. Kokumi exposes a live classifier canary, Cloudflare free-plan quota snapshots, and synthetic hit verification.
/api/v1/health classifier canary, free-plan limit guards, and kokumi health.
Catch silent beacon outages and classifier drift
Built after the Nov 25 beacon outage, GET /api/v1/health and kokumi health check edge beacon activity, run a classifier canary, and report your Cloudflare free-plan limit headroom.
- GET /api/v1/health returns the classifier canary report and Cloudflare free-plan limits snapshot.
- kokumi health returns exit 3 (health_alert) on zero recent beacons, D1 write drops, or canary drift.
- Returns exit 5 (limit) when API_LIMIT (429) or free-plan quota thresholds are reached.
sh
kokumi health --site mainVerify live ingestion after every deploy
Whenever you change a layout, CSP header, or Worker route, send a synthetic beacon hit with kokumi verify to confirm views increment end to end.
- kokumi verify --path / fires a synthetic hit and asserts ingestion succeeds (exit 0).
- Supports --dry-run to inspect the verification step before sending traffic.
- Pair with GET /api/v1/health in cron or agent heartbeats to spot quota pressure before D1 writes stall.
sh
kokumi verify --path /
curl -sS -H "Authorization: Bearer $READ_TOKEN" "https://example.com/api/v1/health"