Skip to content

Uptime monitors

An uptime monitor pings a URL on a fixed interval and records the result as a heartbeat. From those heartbeats PandaStack derives a live UP/DOWN status, an uptime percentage, and — for HTTPS URLs — a TLS certificate snapshot. Monitors also drive alerts on status, latency, error rate, status codes, and certificate expiry.

Each tick, the monitor runs the configured HTTP request and evaluates the response. A probe is considered UP if and only if:

  1. The response status is accepted (see status codes below), and
  2. If a keyword assertion is set, the keyword appears in the response body.

Timeouts, network errors, and non-accepted statuses all produce a DOWN heartbeat with a human-readable message. The check never throws — a failure is recorded as DOWN, not as an error.

FieldTypeDefaultRangeNotes
namestring1–120 chars
urlstring (URL)valid URLThe endpoint to probe.
intervalnumber (s)603086400Seconds between checks.
timeoutnumber (ms)10000100060000Per-request timeout.
retriesnumber1010Retries before marking DOWN.
httpMethodenumGETGET | HEAD | POST
statusCodesarray200–399Accepted codes as ranges/singletons, e.g. ["200-299","401"]. Empty ⇒ default 200-399.
keywordstring≤ 500 charsMust appear in the body. Forces GET if HEAD was chosen.
headersarrayCustom request headers ({ name, value }).
httpBodystringCustom request body.
expireCertNotifybooleanNotify on impending TLS expiry.
ignoreTlsErrorbooleanIgnore TLS validation errors.

The persisted monitor status is only running (active) or pause. Live health is not stored on the monitor row — it is derived from the latest heartbeat. Heartbeat status is one of:

Heartbeat statusMeaning
UPLast probe passed.
DOWNLast probe failed (timeout, network error, or non-accepted status/keyword).
PAUSEMonitor is paused.

Heartbeats are stored in Postgres and time-bucketed on read (no external time-series store). Old heartbeats are pruned on a retention window (default 30 days).

The check itself is run by a scheduler on every tick.

For https URLs, each check refreshes an SSL snapshot on the monitor: subject, issuer, validTo, and daysUntilExpiry. Combined with the ssl_expiry alert metric, this lets you catch certificates before they lapse.

Uptime is computed by time-bucketing the heartbeats table:

  • List and detail endpoints report a 24-hour uptime rollup. PAUSE rows are excluded from the formula.
  • The aggregate endpoint buckets the window to a width that yields roughly 48 buckets:
WindowBucket width
≤ 24h30 minutes
≤ 168h (7d)3 hours
Larger12 hours

Each aggregate bucket carries upCount, downCount, pausedCount, an average response time, and a per-bucket verdict. The overall verdict is down if any bucket is down, otherwise up, otherwise paused.

Alerts fire when a condition holds over a monitor, and stamp lastTriggered when they do. Notification dispatch (email / Slack / webhook) is emitted as an effect that the API wires onto the event bus.

Alert fieldValues
metricstatus | response_time | status_code | error_rate | ssl_expiry
conditiongt | lt | eq | neq
thresholdnumeric threshold for the condition
durationhow long the condition must hold (1–60), default 1
severityinfo | warning | error | critical (default warning)
notifications{ email, slack, webhook } — email defaults on
stateactive | triggered | inactive

For Slack and webhook notifications, supply slackWebhook / webhookUrl on the alert.