Skip to content

Check-ins

View Markdown

Your Honeybadger account comes with check-ins, a way for the processes running on your servers to report that they are alive. Once configured, should a check-in go missing, Honeybadger will send you an alert to let you know that your process has stopped reporting. This is especially useful for monitoring cron jobs, so you can avoid having a cron job silently fail and go unnoticed.

Check-Ins overview

When you create a check-in, you’ll configure the following options:

Check-in creation form

A label for your check-in. If not provided, a token identifier will be used.

An optional human-readable identifier that can be used as an alternate check-in URL. See Slugs below.

Choose Simple to check in at a regular interval, or Cron to use a cron expression for advanced scheduling.

Honeybadger will watch the process at an interval you define.

How often you expect the check-in to report (e.g., “1 hour”).

Cron scheduling allows you to use a cron expression to create an advanced check-in schedule or mirror the cron schedule on your server.

The cron expression (e.g., */5 * * * *).

The time zone of the server where cron is running.

An optional grace period allows some time for long-running tasks to be completed before Honeybadger sends a notification due to a lack of reporting. For example, if you have a job that reports every hour but can take up to twenty minutes to run, you can specify a grace period of twenty minutes, and Honeybadger will allow up to one hour and twenty minutes to elapse before a notification is sent.

When you create a new check-in, you’ll get a URL that you can use to report that your process is alive. The easiest way to report a check-in is with the Honeybadger CLI’s hb check-in command:

Terminal window
@hourly /usr/bin/do_something && hb check-in --id XyZZy

Or use curl to fetch the check-in URL directly:

Terminal window
@hourly /usr/bin/do_something && curl https://api.honeybadger.io/v1/check_in/XyZZy &> /dev/null

See the API docs for more information about the data you can send when reporting a check-in.

You will also get an email address you can use for reporting the status of your process. No subject or body text is required, but the email address is case-sensitive:

Terminal window
@hourly /usr/bin/do_something && echo | mail XyZZy@report.hbchk.in

A slug is an optional, human-readable identifier for a check-in. When you add a slug, you get an alternate check-in URL that uses the slug and a project API key instead of the check-in ID. This is useful if you don’t want to embed check-in IDs in your code or automated systems. For example, if you specify a slug of hourly-check, your alternate check-in URL will look like:

Terminal window
https://api.honeybadger.io/v1/check_in/hbp_ABC/hourly-check

You can add a slug when creating a check-in in the UI, via the REST API, or in a config file using our PHP/Laravel and JavaScript client libraries.

You can POST a small payload to the UI that includes the results of the command you ran, including the command’s output, exit code, and duration. Please see our API documentation for the format of that payload.

Check-in payloadsCheck-in payloads

The easiest way to send check-in payloads is to use the Honeybadger CLI’s hb run command to wrap your scheduled command:

Terminal window
hb run --id XyZZy -- /usr/local/bin/backup.sh

Or POST directly to the check-in API with a JSON payload:

Terminal window
curl -X POST https://api.honeybadger.io/v1/check_in/XyZZy \
-H "Content-Type: application/json" \
-d '{"check_in": {"status": "success", "duration": 1234, "stdout": "backup completed"}}'

You can view the payload data in your check-in history or query it in Insights.

Check-in alerts configuration

When your check-in goes missing, we’ll notify you with information about which job failed to report on time. You can enable or disable these notifications along with the rest of the notification events in your Personal Alerts or Project Integrations settings.

Check out our Status Pages feature for information on how to present the status your check-ins to your users.