ops: add scheduled uptime and origin cert monitor - #4
Open
jalexspringer wants to merge 3 commits into
Open
jalexspringer wants to merge 3 commits into
jalexspringer wants to merge 3 commits into
Conversation
The hosted API returned Cloudflare 525 for about four months after the Fly certificate failed to renew behind the proxy, and nothing alerted. Check the API, CORS preflight and origin cert expiry every 15 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cloudflare serves a managed challenge to GitHub runners, so the proxied hostname can't be checked from Actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The hosted API (
policycheck.openattribution.org) returned Cloudflare 525 for about four months. The Fly certificate couldn't renew while the hostname was proxied. Nothing alerted. The DNS side is fixed (_fly-ownershipTXT plus the_acme-challengeCNAME). This PR adds the missing alerting.Runs every 15 minutes:
/analyzefor openattribution.org against the Fly origin. Fails on non-200 or on a result status other thansuccess. Retries cover cold starts. On failure it logs headers and body.Access-Control-Allow-Origin. Without it, the page shows "Failed to fetch".policycheck.openattribution.orgdirectly. Fails when fewer than 21 days are left. Fly renews at 30 days, so this catches a failed renewal about three weeks before it becomes a 525.Why the origin and not the proxied hostname: Cloudflare returns
403withcf-mitigated: challengeto GitHub runners, and a monitor can't solve a managed challenge. Once the proxied hostname stops challenging API traffic, add a check against it too.Alerting: a failed scheduled run emails whoever last changed the cron line. During an outage that's one email per run. That's noisy, and deliberately so.
🤖 Generated with Claude Code