Monitor your websites, showcase status including daily history, and get Slack notification whenever your website status changes. Using Cloudflare Workers, CRON Triggers, and KV storage. Check my status page out! 🚀
- 🦄 Written in TypeScript
- ✨ Support remote csv monitors
- 🚀 No limit for max monitors of cron task, even with workers KV free tier
- 🪁 Auto GC for KV value size
- 💎 More DX/UX detail you want
You'll need a Cloudflare Workers account with
- A workers domain set up
- The Workers Bundled subscription ($5/mo)
- It works with Workers Free! Check more info on how to run on Workers Free.
- Some websites/APIs to watch 🙂
Also, prepare the following secrets
- Cloudflare API token with
Edit Cloudflare Workers
permissions - Slack incoming webhook (optional)
- Discord incoming webhook (optional)
You can use GitHub Actions to deploy on your own.
-
You should use this template to create a new repository
-
Navigate to your new GitHub repository > Settings > Secrets and variables > Actions and add the following secrets:
- Name: CLOUDFLARE_API_TOKEN - Name: SECRET_SLACK_WEBHOOK_URL (optional) - Value: your-slack-webhook-url - Name: SECRET_DISCORD_WEBHOOK_URL (optional) - Value: your-discord-webhook-url
-
Edit config.ts to adjust configuration and list all of your websites/APIs you want to monitor
-
Push to
master
branch to trigger the deployment -
🎉
-
(optional) Go to Cloudflare Workers settings and assign custom domain/route
-
(optional) Edit wrangler.toml to adjust Worker settings or CRON Trigger schedule, especially if you are on Workers Free plan
The Workers Free plan includes limited KV usage, but the quota is sufficient for 2-minute checks only
- Change the CRON trigger to 2 minutes interval (
crons = ["*/2 * * * *"]
) in wrangler.toml
-
KV replication lag - You might get Slack notification instantly, however it may take couple of more seconds to see the change on your status page as Cron Triggers are usually running on underutilized quiet hours machines.
-
Initial delay (no data) - It takes couple of minutes to schedule and run CRON Triggers for the first time
Requirements
- Pnpm (
npm i -g pnpm
)
Install dependencies
pnpm i
Login With Wrangler to Cloudflare
npx wrangler login
Create your KV namespace in cloudflare
On the workers page navigate to KV, and create a namespace
Update your wrangler.toml with
kv-namespaces = [{binding="KV_STORE", id="<KV_ID>", preview_id="<KV_ID>"}]
Note: you may need to change kv-namespaces
to kv_namespaces
Run
pnpm run dev
You can use remote CSV monitors like this template. You can get the URL by File > Share > Publish to web and select specific sheet and Comma-separated values (.csv).