{"id":13425850,"url":"https://github.com/eidam/cf-workers-status-page","last_synced_at":"2025-05-14T17:09:14.090Z","repository":{"id":37593184,"uuid":"311061056","full_name":"eidam/cf-workers-status-page","owner":"eidam","description":"Monitor your websites, showcase status including daily history, and get Slack/Telegram/Discord notification whenever your website status changes. Using Cloudflare Workers, CRON Triggers, and KV storage.","archived":false,"fork":false,"pushed_at":"2024-08-21T08:32:55.000Z","size":1597,"stargazers_count":2488,"open_issues_count":50,"forks_count":1485,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-07T09:54:36.531Z","etag":null,"topics":["cloudflare-workers","cloudflare-workers-cron","cloudflare-workers-kv","discord","flareact","monitoring","slack-notifications","status-page","telegram-notification","wrangler"],"latest_commit_sha":null,"homepage":"https://status-page.eidam.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eidam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"eidam","ko_fi":"eidam"}},"created_at":"2020-11-08T12:46:35.000Z","updated_at":"2025-05-07T08:49:21.000Z","dependencies_parsed_at":"2024-09-24T23:00:23.948Z","dependency_job_id":"745a1e9e-bd4c-4a2a-b659-e9c655c79665","html_url":"https://github.com/eidam/cf-workers-status-page","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidam%2Fcf-workers-status-page","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidam%2Fcf-workers-status-page/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidam%2Fcf-workers-status-page/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidam%2Fcf-workers-status-page/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eidam","download_url":"https://codeload.github.com/eidam/cf-workers-status-page/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254190396,"owners_count":22029632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare-workers","cloudflare-workers-cron","cloudflare-workers-kv","discord","flareact","monitoring","slack-notifications","status-page","telegram-notification","wrangler"],"created_at":"2024-07-31T00:01:20.396Z","updated_at":"2025-05-14T17:09:14.070Z","avatar_url":"https://github.com/eidam.png","language":"JavaScript","funding_links":["https://github.com/sponsors/eidam","https://ko-fi.com/eidam"],"categories":["JavaScript","discord","monitoring","Opensource","监控","Ueberwachung"],"sub_categories":[],"readme":"# Cloudflare Worker - Status Page\n\nMonitor 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](https://status-page.eidam.dev) out! 🚀\n\n![Status Page](.gitbook/assets/status_page_screenshot.png)\n\n![Slack notifications](.gitbook/assets/slack_screenshot.png)\n\n## Pre-requisites\n\nYou'll need a [Cloudflare Workers account](https://dash.cloudflare.com/sign-up/workers) with\n\n- A workers domain set up\n- The Workers Bundled subscription \\($5/mo\\)\n  - [It works with Workers Free!](https://blog.cloudflare.com/workers-kv-free-tier/) Check [more info](#workers-kv-free-tier) on how to run on Workers Free.\n- Some websites/APIs to watch 🙂\n\nAlso, prepare the following secrets\n\n- Cloudflare API token with `Edit Cloudflare Workers` permissions\n- Slack incoming webhook \\(optional\\)\n- Discord incoming webhook \\(optional\\)\n\n## Getting started\n\nYou can either deploy with **Cloudflare Deploy Button** using GitHub Actions or deploy on your own.\n\n### Deploy with Cloudflare Deploy Button\n\n[![Deploy to Cloudflare Workers](https://camo.githubusercontent.com/1f3d0b4d44a2c3f12c78bd02bae907169430e04d728006db9f97a4befa64c886/68747470733a2f2f6465706c6f792e776f726b6572732e636c6f7564666c6172652e636f6d2f627574746f6e3f706169643d74727565)](https://deploy.workers.cloudflare.com/?url=https://github.com/eidam/cf-workers-status-page)\n\n1. Click the button and follow the instructions, you should end up with a clone of this repository\n2. Navigate to your new **GitHub repository \u0026gt; Settings \u0026gt; Secrets** and add the following secrets:\n\n   ```yaml\n   - Name: CF_API_TOKEN (should be added automatically)\n\n   - Name: CF_ACCOUNT_ID (should be added automatically)\n\n   - Name: SECRET_SLACK_WEBHOOK_URL (optional)\n   - Value: your-slack-webhook-url\n\n   - Name: SECRET_DISCORD_WEBHOOK_URL (optional)\n   - Value: your-discord-webhook-url\n   ```\n\n3. Navigate to the **Actions** settings in your repository and enable them\n4. Edit [config.yaml](./config.yaml) to adjust configuration and list all of your websites/APIs you want to monitor\n\n   ```yaml\n   settings:\n     title: 'Status Page'\n     url: 'https://status-page.eidam.dev' # used for Slack \u0026 Discord messages\n     logo: logo-192x192.png # image in ./public/ folder\n     daysInHistogram: 90 # number of days you want to display in histogram\n     collectResponseTimes: false # experimental feature, enable only for \u003c5 monitors or on paid plans\n\n     # configurable texts across the status page\n     allmonitorsOperational: 'All Systems Operational'\n     notAllmonitorsOperational: 'Not All Systems Operational'\n     monitorLabelOperational: 'Operational'\n     monitorLabelNotOperational: 'Not Operational'\n     monitorLabelNoData: 'No data'\n     dayInHistogramNoData: 'No data'\n     dayInHistogramOperational: 'All good'\n     dayInHistogramNotOperational: 'Some checks failed'\n\n   # list of monitors\n   monitors:\n     - id: workers-cloudflare-com # unique identifier\n       name: workers.cloudflare.com\n       description: 'You write code. They handle the rest.' # default=empty\n       url: 'https://workers.cloudflare.com/' # URL to fetch\n       method: GET # default=GET\n       expectStatus: 200 # operational status, default=200\n       followRedirect: false # should fetch follow redirects, default=false\n       linkable: false # should the titles be links to the service, default=true\n   ```\n\n5. Push to `main` branch to trigger the deployment\n6. 🎉\n7. _\\(optional\\)_ Go to [Cloudflare Workers settings](https://dash.cloudflare.com/?to=/workers) and assign custom domain/route\n   - e.g. `status-page.eidam.dev/*` _\\(make sure you include `/*` as the Worker also serve static files\\)_\n8. _\\(optional\\)_ Edit [wrangler.toml](./wrangler.toml) to adjust Worker settings or CRON Trigger schedule, especially if you are on [Workers Free plan](#workers-kv-free-tier)\n\n### Telegram notifications\n\nTo enable telegram notifications, you'll need to take a few additional steps.\n\n1. [Create a new Bot](https://core.telegram.org/bots#creating-a-new-bot)\n2. Set the api token you received when creating the bot as content of the `SECRET_TELEGRAM_API_TOKEN` secret in your github repository.\n3. Send a message to the bot from the telegram account which should receive the alerts (Something more than `/start`)\n4. Get the chat id with `curl https://api.telegram.org/bot\u003cYOUR TELEGRAM API TOKEN\u003e/getUpdates | jq '.result[0] .message .chat .id'`\n5. Set the retrieved chat id in the `SECRET_TELEGRAM_CHAT_ID` secret variable\n6. Redeploy the status page using the github action\n\n### Deploy on your own\n\nYou can clone the repository yourself and use Wrangler CLI to develop/deploy, extra list of things you need to take care of:\n\n- create KV namespace and add the `KV_STATUS_PAGE` binding to [wrangler.toml](./wrangler.toml)\n- create Worker secrets _\\(optional\\)_\n  - `SECRET_SLACK_WEBHOOK_URL`\n  - `SECRET_DISCORD_WEBHOOK_URL`\n\n## Workers KV free tier\n\nThe Workers Free plan includes limited KV usage, but the quota is sufficient for 2-minute checks only\n\n- Change the CRON trigger to 2 minutes interval (`crons = [\"*/2 * * * *\"]`) in [wrangler.toml](./wrangler.toml)\n\n## Known issues\n\n- **Max 25 monitors to watch in case you are using Slack notifications**, due to the limit of subrequests Cloudflare Worker can make \\(50\\).\n\n  The plan is to support up to 49 by sending only one Slack notification per scheduled run.\n\n- **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](https://blog.cloudflare.com/introducing-cron-triggers-for-cloudflare-workers/#how-are-you-able-to-offer-this-feature-at-no-additional-cost).\n\n- **Initial delay (no data)** - It takes couple of minutes to schedule and run CRON Triggers for the first time\n\n## Future plans\n\nWIP - 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.\n\nThere 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).\n\n## Running project locally\n**Requirements**\n- Linux or WSL\n- Yarn (`npm i -g yarn`)\n- Node 14+\n\n### Steps to get server up and running\n**Install wrangler**\n```\nnpm i -g wrangler\n```\n\n**Login With Wrangler to Cloudflare**\n```\nwrangler login\n```\n\n**Create your KV namespace in cloudflare**\n```\nOn the workers page navigate to KV, and create a namespace\n```\n\n**Update your wrangler.toml with**\n```\nkv-namespaces = [{binding=\"KV_STATUS_PAGE\", id=\"\u003cKV_ID\u003e\", preview_id=\"\u003cKV_ID\u003e\"}]\n```\n_Note: you may need to change `kv-namespaces` to `kv_namespaces`_\n\n**Install packages**\n```\nyarn install\n```\n\n**Create CSS**\n```\nyarn run css\n```\n\n**Run**\n```\nyarn run dev\n```\n_Note: If the styles do not come through try using `localhost:8787` instead of `localhost:8080`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feidam%2Fcf-workers-status-page","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feidam%2Fcf-workers-status-page","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feidam%2Fcf-workers-status-page/lists"}