> /services/gulpd
gulpd
alphaHosted uptime, TLS-expiry and heartbeat monitor for bots: register website and certificate checks or job heartbeats at api.crocbot.net, read their state as JSON.
Details
gulpd is gulp's checks as a hosted service run by crocbot.net: instead of running a checker on a schedule yourself, you register URLs, certificates and heartbeats once and read their state as JSON whenever you want.
- Website checks: HTTP status, latency, redirects and the final URL, plus the TLS certificate of the site (days left, issuer, chain validity, name match), every 5 minutes to 24 hours.
- Certificate checks: a
host:porttarget gets only the TLS handshake, for mail servers and other TLS ports. - Heartbeats work the other way round: your cron job or bot POSTs to a ping URL when it runs (GET is no longer accepted), and gulpd marks the heartbeat late, then down, when the pings stop or a job reports a failure. A check or heartbeat can also push a signed webhook when its status changes.
There are no accounts: one POST mints a bearer token, and that token is the only identity. Response bodies of checked sites are never stored or returned, only status codes, timings and certificate facts.
The API is live at https://api.crocbot.net/v1/monitor (alpha: the interface may still gain fields, and the free tier is small). Health is at /v1/monitor/health. For one-off checks from your own machine, the free gulp CLI runs the same checks locally.
API reference
Base URL: https://api.crocbot.net/v1/monitor. Every route lives under /v1/monitor/. JSON in and out (Content-Type: application/json, at most 8 KiB); times are RFC 3339 UTC; every error is {"error": "<code>", "message": "<text>"}, plus retry_after (seconds, also sent as Retry-After) on 429 and 503.
Quick start
B=https://api.crocbot.net/v1/monitor
# 1. mint a token (shown only once; keep it)
curl -s -X POST $B/tokens
# {"token":"glp_3f9a…","token_note":"shown only once; …","created_at":"…","limits":{…}}
TOKEN=glp_3f9a…
# 2. watch a website (HTTP status 200-399 expected, certificate warning at 14 days left)
curl -s $B/checks -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' -d '{"target":"https://crocbot.net/","name":"home"}'
# 3. watch only a certificate (host:port), hourly
curl -s $B/checks -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' -d '{"target":"api.crocbot.net:443","interval_secs":3600}'
# 4. a heartbeat for an hourly job, with 5 minutes of grace
curl -s $B/heartbeats -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' -d '{"period_secs":3600,"grace_secs":300,"name":"backup"}'
# {"id":"b657…","status":"new","ping_url":"https://api.crocbot.net/v1/monitor/ping/9258…",…}
# 5. from the job: POST a ping on success, or report a failure (GET returns 405)
curl -fsS -m 10 --retry 3 -X POST https://api.crocbot.net/v1/monitor/ping/9258…
curl -fsS -m 10 -X POST https://api.crocbot.net/v1/monitor/ping/9258…/fail
# 5b. optional: a signed webhook when a check or heartbeat changes status
curl -s -X PUT $B/heartbeats/$HID/alert -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{"url":"https://bot.example.net/hooks/gulpd"}'
# {"heartbeat_id":"…","alert":{…},"secret":"gkw_…","secret_note":"…"} (secret shown once)
# 6. read the overall state, or one check with its history
curl -s $B/summary -H "Authorization: Bearer $TOKEN"
curl -s "$B/checks/56a7…?limit=20" -H "Authorization: Bearer $TOKEN"
# 7. clean up one item, or the token with everything it owns
curl -s -X DELETE $B/checks/56a7… -H "Authorization: Bearer $TOKEN"
curl -s -X DELETE $B/tokens/self -H "Authorization: Bearer $TOKEN"
# {"deleted":true,"checks":1,"heartbeats":1}
Endpoints
GET /v1/monitor/: service index with endpoints and limits. No auth.GET /v1/monitor/health:{status, version, uptime_secs, time, database};503if the database is unreachable.GET /v1/monitor/stats: aggregate counts only, never targets or names.GET /v1/monitor/status: the public status page (HTML): version, uptime, health, active checks and heartbeats against capacity, activity in the last 24 hours. Aggregate numbers only, nothing per token. No auth.POST /v1/monitor/tokens: mint a token (glp_+ 64 hex digits), answered201. No auth.DELETE /v1/monitor/tokens/self: delete the calling token and everything it owns (checks with their history, heartbeats, events), answered{"deleted": true, "checks": N, "heartbeats": N}. The token and its ping URLs stop working at once; the deletion does not give back a new-token slot for the day. Bearer.GET /v1/monitor/summary: the token's overall state: counts by status, the items that need attention, the soonest-expiring certificate. Bearer.overallisemptywhen the token has no checks and no heartbeats,pendingwhen it has items but none has a result yet, otherwise the worst current status (ok,warn,fail,error; a late heartbeat counts aswarn, a down one aserror).GET /v1/monitor/checks,POST /v1/monitor/checks: list ({checks, count, limit}) or add a check (201+Location; the first run is due at once). Bearer.GET /v1/monitor/checks/{id}: one check withhistory(newest first;?limit=1..500, default 50) and its last 20 statusevents.DELETEremoves it ({deleted: id}). Bearer, the owning token only.GET /v1/monitor/heartbeats,POST /v1/monitor/heartbeats: list or add a heartbeat (201+Location; the response carriesping_url). Bearer.GET /v1/monitor/heartbeats/{id}: one heartbeat with its last 20 statusevents.DELETEremoves it, and its ping URL stops working. Bearer, the owning token only.POST /v1/monitor/ping/{key}: record a successful ping;POST .../ping/{key}/failrecords a failure (the heartbeat isdownuntil the next successful ping). No auth: the key in the ping URL is the secret. POST bodies are ignored.GETon either path returns405 method_not_allowedand a message that says to use POST.PUT /v1/monitor/checks/{id}/alertandPUT /v1/monitor/heartbeats/{id}/alert: set or replace the webhook target, body{"url": "https://..."}. Returns the newsecretonce (201new,200replaced; replacing rotates the secret). Bearer (owner).DELETEremoves it.POST .../alert/testsends one{kind}.testevent now (one attempt) and returns what was sent.
Any authenticated request extends the expiry of all the token's checks and heartbeats to 30 days from then. A token unused for 30 days is deleted with everything it owns.
Check request
target(aliasurl, required): anhttps://orhttp://URL on port 80, 443, 8080 or 8443 for a website check, orhost:port/host(port 443) for a certificate-only check on a TLS port (443, 465, 563, 636, 853, 989, 990, 992 to 995, 5061, 6697, 8443, 9443). At most 2048 ASCII characters (punycode for international names), no credentials.name: up to 100 characters.interval_secs: 300 to 86400, default 900.warn_days: certificate expiry warning threshold, 0 to 365, default 14.- Website checks only:
expect, the accepted HTTP statuses such as"200"or"200-299,401"(at most 10 ranges, default"200-399");method,"GET"(default) or"HEAD";warn_ms, warn when the response takes longer (1 to 10000).
Unknown fields are rejected. The same token cannot add the same target with the same method twice (409).
The check object
{"id": "56a75c74-…", "name": "home", "type": "url", "target": "https://crocbot.net/",
"interval_secs": 900, "warn_days": 14, "status": "ok", "status_since": "2026-10-28T04:42:47Z",
"last": {"at": "…", "status": "ok", "problems": [], "latency_ms": 7, "http_status": 200,
"final_url": null, "redirects": 0,
"tls": {"days_left": 86, "not_after": "2027-01-22T16:52:46Z", "issuer": "C=US, O=Let's Encrypt, CN=YE2"},
"error_kind": null},
"next_run_at": "…", "run_count": 1, "created_at": "…", "expires_at": "…",
"url": "https://api.crocbot.net/v1/monitor/checks/56a75c74-…",
"method": "GET", "expect": "200-399", "warn_ms": null,
"history": [{"at", "status", "latency_ms", "http_status", "tls_days_left", "problem", "error_kind"}],
"events": [{"at", "from": "pending", "to": "ok", "detail": null}]}
historyandeventsappear only onGET /checks/{id}.final_urlis set when the URL redirected.problemsholds up to 5 short human-readable reasons.pending: not run yet.ok: everything as expected.warn: works, but the certificate expires withinwarn_days, the response was slower thanwarn_ms, or https redirected to plain http.fail: the target answered wrongly: a status outsideexpect; a certificate that is expired, not yet valid, untrusted or for another name; or a redirect to somewhere gulpd refuses to follow.error: no answer;error_kindsays why, e.g.dns,connect,timeout,tls.
Heartbeats
Request: period_secs (required), the expected time between pings, 60 to 604800 (7 days); grace_secs, extra time after a missed ping before it counts as down, 0 to 86400, default 300; name, up to 100 characters.
{"id": "b657e246-…", "name": "backup", "status": "up", "status_since": "…",
"period_secs": 3600, "grace_secs": 300,
"ping_url": "https://api.crocbot.net/v1/monitor/ping/9258…",
"last_ping_at": "…", "next_ping_due_at": "…", "down_at": "…", "last_fail_at": null,
"ping_count": 1, "fail_count": 0, "created_at": "…", "expires_at": "…",
"url": "https://api.crocbot.net/v1/monitor/heartbeats/b657e246-…"}
new: no ping yet.up: last ping withinperiod_secs.late: past the period but within the grace time.down: past period plus grace, or a/failping newer than the last successful one.- A ping answers
{"ok": true, "recorded": true, "status": "up", "next_ping_due_at": "…"}. Pings of one heartbeat less than 5 s apart answer"recorded": falseand are not written.
Webhooks
When a check or heartbeat with an alert target changes status (not the first pending→ok or new→up), gulpd POSTs a small JSON event to it. Headers are X-Gulpd-Event, X-Gulpd-Delivery, X-Gulpd-Timestamp and X-Gulpd-Signature: sha256=… (HMAC-SHA256 over <timestamp>.<raw body> with the per-item secret, shown once). Events are check.status / heartbeat.status, or check.test / heartbeat.test from the test endpoint. Verify them the same way as lurkd's (X-Gulpd-*, 5-minute timestamp window, deduplicate on delivery id). Targets must be public https:// URLs on port 443 (same address rules as lurkd), checked when the target is set and again on every delivery; no redirects; 5 s timeout; 3 attempts (10 s / 60 s backoff). The last delivery's outcome is on the item's alert object. The secret is never shown again.
Free-tier limits
- 10 checks and 10 heartbeats per token; 5 new tokens per client address per day (
429withRetry-After). - 500 active checks and 1000 active heartbeats for the whole service (
503capacity). - Checks every 300 s at the most often, 900 s by default, 86400 s at the least; 10 s per run, all redirects included; up to 5 redirects.
- 120 requests per token per minute (
429). Request bodies up to 8 KiB. - History: the last 500 results or 7 days, whichever is fewer; 50 status events per item. Everything expires after 30 days without authenticated use.
- Webhooks: 10 alert targets per token across checks and heartbeats; 60 deliveries per token per hour (a change over that is recorded as a failed delivery, not sent), of which at most 10 tests.
Safety
- Targets must be public. Private, loopback, link-local, CGNAT, multicast, documentation and cloud-metadata addresses are refused, as are names like
localhostand*.internal(422target_refused, ordns_failed). - Every address is checked when a target is added and again at every run, inside the resolver, so a name that later points somewhere private is refused, not connected to.
- gulpd follows redirects itself, one hop at a time. Each hop is validated like a new target and loops are detected; a refused hop makes the run
fail. - At most 3 checks run at once, with at least 2 s between runs against one host. Response bodies are never kept or returned.
- Its User-Agent names the docs page,
https://crocbot.net/services/gulpd/. Tokens are stored only as SHA-256 hashes.