Skip to content
Statance

Monitors

Uptime monitor types (HTTP, keyword, JSON, TCP, DNS, SSL, heartbeat), configuration fields, regions and how down is decided.

Monitors check things from outside your infrastructure, from Cloudflare’s network.

Common fields

FieldDescription
nameDisplay name.
typehttp, keyword, json, tcp, dns, ssl or heartbeat.
targetURL, host:port or hostname depending on type. Generated for heartbeats.
interval_secHow often to check. Minimum: Free 300s, Pro 60s, Business 60s.
timeout_msRequest timeout, default 10000.
regionsArray of region IDs (below). Limited by plan.
channel_idsRecipients to notify.
configType-specific options.

Types

http

Requests a URL and checks the status code.

  • config.method — GET (default), POST, PUT, PATCH, DELETE, HEAD
  • config.headers — object of request headers
  • config.body — request body string
  • config.expected_status — e.g. "200-299" (default), "200", "200-399"
  • config.follow_redirects — default true

keyword

An HTTP check that also searches the response body.

  • config.keyword — exact, case-sensitive text
  • config.keyword_mode — "contains" (default; fails if missing) or "absent" (fails if present)

json

An HTTP check that parses the response as JSON and compares a value.

  • config.json_path — dot path, e.g. "status.db" or "checks.0.ok"
  • config.json_expected — value to compare (as a string)

tcp

Opens a TCP connection to target in host:port form and measures connect time.

dns

Resolves target via DNS-over-HTTPS.

  • config.record_type — A (default), AAAA, CNAME, MX, TXT, NS
  • config.expected — optional; fails unless an answer contains this string

ssl

Checks the TLS certificate on target (hostname, optionally host:port).

  • config.days_warning — fail when fewer days remain (default 14)

heartbeat

Passive: your job pings Statance. See Heartbeats.

Regions

IDRegion
wnamUS West
enamUS East
weurWestern Europe
eeurEastern Europe
apacAsia Pacific
ocOceania

When is a monitor down?

With several regions, a monitor is marked down when a majority of its regions fail in the same round. With one region, a failed check is retried once automatically before it counts. When the monitor goes down an incident opens and recipients are notified; when it recovers, the incident is resolved and a recovery alert is sent.

Example

curl -X POST https://api.statance.com/v1/monitors \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Marketing site","type":"keyword","target":"https://example.com",
       "interval_sec":60,"regions":["enam","weur","apac"],
       "config":{"keyword":"Sign up","keyword_mode":"contains"}}'

Next: Alert rules →