UPTIME
UPTIME
SERVICE CONTRACT · VIEW: GOV
Constraints
MUST: Discover URLs from compiled HTTP.json (service_frontends + domains + sites)
MUST: Check each discovered URL for HTTP 200 (or 301/302 for redirects)
MUST: Record response time (ms) for each URL
MUST: Check SSL certificate expiry (warn at T-30d)
MUST: Alert on any non-2xx/3xx response
MUST NOT: Hardcode URLs — all check targets discovered from HTTP.json
Capabilities
HEALTH_CHECK, SSL_MONITOR, RESPONSE_TIME
TASK Contract
| Field | Value |
|---|---|
| task | UPTIME |
| schedule | 0 * * * * |
| scope | discovered from HTTP.json — service_frontends, domains, sites |
| write | SERVICES/TASK/_data/UPTIME.json |
| model | claude-haiku-4-5 |
Prompt
You are the UPTIME MONITOR agent. Read SERVICES/UPTIME/CANON.md first.
Discover all URLs to check from the compiled HTTP contract:
- Find and read SERVICES/HTTP/HTTP.json or _data/HTTP.json (the compiled HTTP contract)
- From
sites[]: checkhttps://{site}/for each entry (root domain health) - From
service_frontends: for each site and path entry, checkhttps://{site}/{path_lowercase}/ - From
domains[]: checkhttps://{domain}/for each domain whereserveis not null
| For each discovered URL: curl -sI, record HTTP status code and response time. Also check SSL expiry for each unique domain with: echo | openssl s_client -connect {domain}:443 2>/dev/null | openssl x509 -noout -enddate. |
Write results to SERVICES/TASK/_data/UPTIME.json with _generated marker. Include the total count of URLs discovered and checked. If any URL returns non-2xx/3xx, commit with ALERT in the message. If all healthy, commit only if status changed from previous run.
| *UPTIME | CANON | SERVICES* |
UPTIME · SERVICE CONTRACT · CANONIC ∩