Lazy loaded image
eidam/cf-workers-status-page
Words 780Read Time 2 min
2026-2-16
2026-2-19
type
Post
status
Published
date
Feb 16, 2026
slug
status-page1
summary
利用Cloudflare Workers实现网页状态监控
tags
cloudflare
github
category
开源分享
icon
password
网址
 
部署教程
 
 
Cloudflare Worker - Status Page
Monitor your websites, showcase status including daily history, 和 get Slack notification whenever your website status changes. Using Cloudflare Workers, CRON Triggers, 和 KV storage. Check my status page out! 🚀
Status Page
Slack notifications
Pre-requisites
You'll need a Cloudflare Workers account with
  • A workers domain set up
  • 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)
Getting started
You can either deploy with Cloudflare Deploy Button using GitHub Actions or deploy on your own.
Deploy with Cloudflare Deploy Button
  1. Click the button and follow the instructions, you should end up with a clone of this repository
  1. Navigate to your new GitHub repository > Settings > Secrets and add the following secrets:
    1. Navigate to the 操作 settings in your repository and enable them
    1. 编辑 config.yaml to adjust configuration and list all of your websites/APIs you want to monitor
      1. Push to main branch to trigger the deployment
      1. 🎉
      1. (optional) Go to Cloudflare Workers settings and assign custom domain/route
          • e.g. status-page.eidam.dev/* (make sure you include /* as the Worker also serve static files)
      1. (optional) 编辑 wrangler.toml to adjust Worker settings or CRON Trigger schedule, especially if you are on Workers Free plan
      Telegram notifications
      To enable telegram notifications, you'll need to take a few additional steps.
      1. Create a new Bot
      1. Set the api token you received when creating the bot as content of the SECRET_TELEGRAM_API_TOKEN secret in your github repository.
      1. Send a message to the bot from the telegram account which should receive the alerts (Something more than /start)
      1. Get the chat id with curl https://api.telegram.org/bot<YOUR TELEGRAM API TOKEN>/getUpdates | jq '.result[0] .message .chat .id'
      1. Set the retrieved chat id in the SECRET_TELEGRAM_CHAT_ID secret variable
      1. Redeploy the status page using the github action
      Deploy on your own
      You can clone the repository yourself and use Wrangler CLI to develop/deploy, extra list of things you need to take care of:
      • create KV namespace and add the KV_STATUS_PAGE binding to wrangler.toml
      • create Worker secrets (optional)
        • SECRET_SLACK_WEBHOOK_URL
        • SECRET_DISCORD_WEBHOOK_URL
      Workers KV free tier
      The Workers Free plan includes limited KV usage, but the quota is sufficient for 2-minute checks only
      • Change the CRON trigger to 2 分钟之前 interval (crons = ["*/2 * * * *"]) in wrangler.toml
      Known issues
      • Max 25 monitors to watch in case you are using Slack notifications, due to the limit of subrequests Cloudflare Worker can make (50).
        • The plan is to support up to 49 by sending only one Slack notification per scheduled run.
      • Initial delay (no data) - It takes couple of minutes to schedule and run CRON Triggers for the first time
      Future plans
      WIP - Support for Durable Objects - Cloudflare's product for low-latency coordination and consistent storage for the Workers platform. There is a working prototype, however, we are waiting for at least open beta.
      There is also a managed version of this project, currently in beta. Feel free to check it out https://statusflare.com (https://twitter.com/statusflare_com).
      Running project locally
      Requirements
      • Linux or WSL
      • Yarn (npm i -g yarn)
      • Node 14+
      Steps to get server up and running
      Install wrangler
      Login With Wrangler to Cloudflare
      Create your KV namespace in cloudflare
      Update your wrangler.toml with
      Note: you may need to change kv-namespaces 到 kv_namespaces
      Install packages
      Create CSS
      Run
      Note: If the styles do not come through try using localhost:8787 instead of localhost:8080
      上一篇
      CloudFlare ImgBed部署教程
      下一篇
      imzyb/MiSub