Skip to main content

Health Check Monitors

Health check monitors parse JSON responses that report on multiple sub-checks within your application. This allows you to monitor database connections, disk space, queue health, and other application components from a single endpoint.

Endpoints

MethodPathDescription
GET/health_check_monitorsList all health check monitors
GET/health_check_monitors/:idGet a specific monitor
POST/health_check_monitorsCreate a monitor
PUT/health_check_monitors/:idUpdate a monitor
DELETE/health_check_monitors/:idDelete a monitor

Health Check Monitor Object

{
"id": "xyz789",
"title": "App Health",
"url": "https://example.com/health",
"alert_group_id": "abc123",
"status": "up",
"staleness_threshold_minutes": 10,
"checks_total": 5,
"checks_passing": 5,
"checked_at": "2024-01-15T10:35:00Z",
"finished_at": "2024-01-15T10:34:55Z",
"external_id": "main-app-health",
"inserted_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}

Fields

FieldTypeDescription
titlestringName of the monitor (required)
urlstringHealth check endpoint URL (required)
alert_group_idstringAlert group to notify (required)
staleness_threshold_minutesintegerAlert if finishedAt is older than this (default: 10)
statusstringCurrent status: up, down, degraded, stale, or pending
checks_totalintegerTotal number of sub-checks in the response
checks_passingintegerNumber of sub-checks with status ok
finished_atdatetimeTimestamp from the health check response
external_idstringYour identifier for idempotent operations

Status Values

StatusDescription
upAll checks passing
downOne or more checks have failed or crashed status
degradedOne or more checks have warning status (no incident created)
staleThe finishedAt timestamp is older than the staleness threshold
pendingMonitor has not been checked yet

Expected Response Format

Your health check endpoint must return JSON in the following format:

{
"finishedAt": "1638879833",
"checkResults": [
{
"name": "UsedDiskSpace",
"label": "Used Disk Space",
"status": "ok",
"notificationMessage": "",
"shortSummary": "45%",
"meta": {"disk_space_used_percentage": 45}
},
{
"name": "Database",
"label": "Database Connection",
"status": "ok",
"notificationMessage": "",
"shortSummary": "connected",
"meta": {}
}
]
}

Check Result Fields

FieldTypeDescription
namestringUnique identifier for the check (required)
labelstringHuman-readable name
statusstringok, warning, failed, crashed, or skipped
notificationMessagestringDetailed message shown in incidents
shortSummarystringBrief status shown in dashboard
metaobjectAdditional metadata

The finishedAt field should be a Unix timestamp (seconds since epoch) indicating when the checks were last run.

Create a Health Check Monitor

curl -X POST https://beepr.io/api/v1/health_check_monitors \
-H "Authorization: Bearer bpr_your_key" \
-H "Content-Type: application/json" \
-d '{
"alert_group_id": "abc123",
"title": "App Health",
"url": "https://example.com/health",
"staleness_threshold_minutes": 15,
"external_id": "main-app-health"
}'

Filtering by Alert Group

List monitors for a specific alert group:

curl "https://beepr.io/api/v1/health_check_monitors?alert_group_id=abc123" \
-H "Authorization: Bearer bpr_your_key"

Idempotent Creation

If you provide an external_id and a monitor with that ID already exists, the API will update the existing monitor instead of creating a duplicate.

For the complete schema, see the OpenAPI specification.