Skip to content

Heartbeat checks

Choose Ping for jobs and systems that can report their own activity. A check starts with a default location. Add named locations for independent senders, such as workers in different regions; each has a different secret URL.

Option Meaning and constraints
Name Required recognizable check name
Schedule type Interval (default) or cron
Interval Positive seconds; the new-check form starts at one hour
Cron expression Required for cron; must be a valid expression
Timezone Defaults to UTC; used to interpret cron
Grace period Buffer in seconds; default zero; automation requires a nonnegative integer
Locations required for healthy Positive count or blank to require all locations
Locations required to avoid failing Positive count; default one; cannot exceed the healthy requirement
Reported value alerting Check-ins only, above a threshold, or below a threshold
Warning and critical values Both required together for value monitoring; numeric, including fractional values
Notification groups Existing groups in this account; assignment requires alert-management permission

For above, critical must be greater than warning. For below, critical must be less than warning. Equality with a threshold counts as a breach. The worst reported value across locations is combined with quorum health: the more severe result wins. Locations that have never reported a value are excluded from numeric evaluation. A heartbeat without a valid value does not erase a location’s previously reported value.

GET and POST are accepted at the location’s /ping/<token> URL. See the ingestion reference for request details.

Terminal window
curl --fail --silent --show-error \
--get --data-urlencode 'value=42' "$PINGSTACK_PING_URL"

A POST body can contain JSON or raw diagnostic text. exit_code is stored as activity data; on a normal heartbeat it does not make a location fail. Every accepted heartbeat marks an active location up, so send only after the activity you want to monitor.

Until a check gets its first ping, its page offers Send a test ping (Editors and Admins). It records a ping on the first location, the same as a request to its URL, so the next deadline is calculated from it. It works only before the check’s first report; after that, report through the location’s URL.

Send a request to the location’s URL with /start added to the end when the job begins. It changes no status. The location’s next heartbeat or failure report records how long the run took, and the check’s recent results show a Run time column once any run has reported one.

Terminal window
curl --fail --silent --show-error "$PINGSTACK_PING_URL/start"
your-job && curl --fail --silent --show-error "$PINGSTACK_PING_URL"

A start older than the location’s last report belongs to a run that never reported, so it’s ignored. The pingstack command sends the start, the heartbeat and failures for you.

When a job knows it failed, send the same request to the location’s URL with /fail added to the end. The location becomes Failed at once instead of waiting for its deadline and grace period, and counts as not checked in for quorum. On a check with one location the check goes down and an incident opens immediately, with a cause such as “job reported a failure (exit code 2)” when you send exit_code. On a check with several locations the cause names the failed location.

Terminal window
your-job || curl --fail --silent --show-error "$PINGSTACK_PING_URL/fail?exit_code=$?"

The next normal heartbeat from that location recovers it. A failure report accepts the same exit_code, value and body as a heartbeat and counts toward the same rate limits. In the check’s recent results, a failure report shows in red as Failed · Exit code 2, or just Failed when no exit code was sent.

If a check is paused, ingestion returns success without recording activity. Pause and resume aren’t check fields; they’re separate API operations.

After a heartbeat, an interval deadline is calculated from its receipt time. For cron, the next occurrence in the configured timezone is used. An overdue location becomes late after its grace period, but the check’s overall health depends on quorum and numeric thresholds.

Use recipes to report from jobs and scripts. Keep location URLs private; disclosure lets someone falsely report health.