RaaqebDocsالعربية
RaaqebDocsالعربية

Heartbeats

The address a job calls to tell its heartbeat monitor it ran.

A heartbeat monitor expects a heartbeat once per period. When none arrives within the period and its grace period, its check is down with the reason "heartbeat late". Each heartbeat monitor has its own URL with a token, shown in its Heartbeat URL panel once saved; heartbeat monitors covers the setup. Call it at the end of your job with whichever method is easiest:

sh
curl -fsS https://status.example.com/api/heartbeat/<token>

The token is the only credential. Anyone who has it can record heartbeats for the monitor.

Record a heartbeat

GET HEAD POST/api/heartbeat/{token}

Record a heartbeat

Records a heartbeat for the heartbeat monitor with this token, by whichever method the job finds easiest.

Parameters

NameInTypeDescription
tokenpathstring matching ^[\w-]{22}$The secret in the URL Raaqeb gave out: a heartbeat monitor's, shown in its Heartbeat URL panel, or a subscription's, in the links its subscriber was sent.

Responses

StatusAnswer
200The heartbeat was recorded. A HEAD gets no body. Body: text/plain OK.
404No heartbeat monitor has this token. Body: text/plain Not Found.
503The database is not open or did not answer. Body: text/plain Service Unavailable.

On this page