Loading…

Heartbeat Checks

Unsure about the status of your background processes? Monitor your cronjobs and other scripts with a heartbeat check. By calling our endpoints from your script, we can see the status and alert you when something goes haywire.

Creating a new check

  1. Click the “+ Add Check” button and choose “Heartbeat”
  2. Enter a name for your new check
  3. Choose a schedule to be monitored and any additional options

Adding an Uptime check

Pinging your check

By pinging Bolstat we will know the status of your process. Call our endpoint at the end of a task and Bolstat will know that your task completed successfully (or not). You can find the unique URL’s on the check details page after creating it.

There are three different endpoints:

  1. PING_URL/start - Call this endpoint at the beginning of your script to measure execution time (optional).
  2. PING_URL/completed - Call the completed endpoint at the end of your script to signal successful completion.
  3. PING_URL/failed - Signal a task failure by calling this endpoint.

The “start” endpoint is optional, you can just use the completed or failed endpoint, but you will miss out on the execution time.

If you are running a task on multiple hosts, you can define the name of your host by appending ?host=my_host_name to the start and completed endpoints when executing the requests.

When running multiple instances of a task in parallel, you can use the parameter ?series=script_random_string on the start, completed and failed pings to make sure pings are matched up and measured correctly. Make sure the random string is unique to each script instance and is the same for the start completed/failure combination.

Schedule Monitoring

You can enable one of the two schedule monitoring options if you want to get an alert from Bolstat when your processes are not running as expected.

The Simple schedule option allows you to select one consistent period between two executed tasks. This suits recurring tasks which run every hour, day, etc. Have more complicated schedules? Select the crontab option and enter your crontab syntax.

The Grace period is the margin between the point that the task should have been executed and the point where we consider the task late. We will trigger an alert When schedule monitoring is enabled, and the late point is exceeded without receiving a completed or failed ping.