Set up a heartbeat
Send a signal when a job finishes, then check what Chimlet records when the next signal misses its deadline.
Create the check
- Open a workspace where you can manage checks. In Checks, select New check and choose Heartbeat.
- Give it a name such as Nightly backup. For a daily backup, set the interval to one day and the grace period to 1,800 seconds to allow an extra 30 minutes.
- Review the schedule, then select Create check. A deadline starts when Chimlet receives the first report or when you select Start monitoring in Setup.
Get a signal key
On the check’s Setup tab, select Generate signal key, then confirm with Replace or issue key. Save the key securely before leaving Setup. Replacing it immediately invalidates the previous key for this check.
Send a signal
Use the check’s generated command or set these variables in the environment that will send the request.
CHIMLET_BASE_URL- The origin of your Chimlet instance, without a trailing slash.
CHIMLET_CHECK_ID- The check ID in the endpoint shown in Setup.
CHIMLET_SIGNAL_KEY- The generated bearer key for this check.
curl --fail-with-body --silent --show-error --request POST \
"$CHIMLET_BASE_URL/api/v1/checks/$CHIMLET_CHECK_ID/signals" \
--header "Authorization: Bearer $CHIMLET_SIGNAL_KEY"An empty body reports success. Chimlet responds with 202 Accepted and a receipt. Open Signals on the check to confirm the report.
Connect your job
Run the signal command only after the work succeeds. Replace ./backup.sh with the command you want to monitor.
./backup.sh &&
curl --fail-with-body --silent --show-error --request POST \
"$CHIMLET_BASE_URL/api/v1/checks/$CHIMLET_CHECK_ID/signals" \
--header "Authorization: Bearer $CHIMLET_SIGNAL_KEY"To report a known failure immediately, send status: failure with an optional message.
curl --fail-with-body --silent --show-error --request POST \
"$CHIMLET_BASE_URL/api/v1/checks/$CHIMLET_CHECK_ID/signals" \
--header "Authorization: Bearer $CHIMLET_SIGNAL_KEY" \
--header "Content-Type: application/json" \
--data '{"status":"failure","message":"Backup failed"}'If you retry a request, reuse its Idempotency-Key with the same payload. Within 24 hours, a replay returns the original receipt and leaves the deadline unchanged.
Verify a missed deadline
- Create a separate heartbeat with a one-minute interval and zero grace. Generate a key for that check and send one signal.
- Let the next deadline pass. Once the worker records it, look for the missed deadline in Signals or Issues.
- Send a fresh success. Check the Overview for the new deadline and Issues for the recovery.