At cdnjs, we use UptimeRobot 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, 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.
- Create (or have) an UptimeRobot account with monitors configured.
- Create (or have) an Atlassian Statuspage account with "post my own data" metrics configured.
- Create your
development.env
file. Copydevelopment.env.sample
and fill out the information for Sentry, as well as API keys for UptimeRobot & Statuspage. - Update the tracked
src/data.yml
file with your UptimeRobot monitor and Statuspage metric data. - Authenticate with Wrangler by running
wrangler login
. - Update
wrangler.toml
for your account. Usewrangler whoami
to get your account ID, update the value inwranglar.toml
to match. - Develop with the worker by running
npm run dev
.
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.