https://github.com/cdnjs/statuspage-metrics-worker
The edge worker that syncs cdnjs metrics to statuspage
https://github.com/cdnjs/statuspage-metrics-worker
Last synced: about 1 year ago
JSON representation
The edge worker that syncs cdnjs metrics to statuspage
- Host: GitHub
- URL: https://github.com/cdnjs/statuspage-metrics-worker
- Owner: cdnjs
- License: mit
- Created: 2021-03-01T12:09:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T15:19:39.000Z (over 4 years ago)
- Last Synced: 2024-10-29T12:35:27.585Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://status.cdnjs.com
- Size: 109 KB
- Stars: 9
- Watchers: 6
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The #1 free and open source CDN built to make life easier for developers.
---
## Introduction
At cdnjs, we use
[UptimeRobot](https://uptimerobot.com/?utm_source=cdnjs&utm_medium=cdnjs_link&utm_campaign=cdnjs_readme)
to provide continual, minute-by-minute monitoring of our services. This tracks our uptime across a
number of different web properties, as well as the response latency on them.
Our public status page is powered by
[Atlassian Statuspage](https://www.statuspage.io/?utm_source=cdnjs&utm_medium=cdnjs_link&utm_campaign=cdnjs_readme),
but we also like to share raw latency data for our key services on there to help with giving the
community real-time insight into performance.
To get the data from UptimeRobot to Atlassian Statuspage, we built this little Cloudflare Worker
that runs once per minute, fetching the latest latency data from UptimeRobot, transforming it and
sending it over to our Statuspage.
## Development
1. Create (or have) an UptimeRobot account with monitors configured.
2. Create (or have) an Atlassian Statuspage account with "post my own data" metrics configured.
3. Create your `development.env` file. Copy `development.env.sample` and fill out the information
for Sentry, as well as API keys for UptimeRobot & Statuspage.
4. Update the tracked `src/data.yml` file with your UptimeRobot monitor and Statuspage metric data.
5. Authenticate with Wrangler by running `wrangler login`.
6. Update `wrangler.toml` for your account. Use `wrangler whoami` to get your account ID, update the
value in `wranglar.toml` to match.
7. Develop with the worker by running `npm run dev`.
## Deployments
To deploy to production, run `npm run publish:production`. As this Worker is based on a cron
trigger, it is published in the Workers Dev context and does not need a set zone ID.