Performance

Cron monitors, uptime and status pages

Know when a scheduled job fails, runs late or never runs, check that your site answers, report your own health with heartbeats, and publish a status page.

Markdown

AppHelm watches three kinds of health:

  • Cron monitors watch scheduled jobs. A job checks in when it starts and when it ends. AppHelm alerts when a run fails, runs too long, or never arrives.
  • Uptime checks request a URL of yours every one or five minutes and alert when it stops answering as expected. They also warn before its TLS certificate expires.
  • Status pages show a product's health to your users, fed by its uptime check or by heartbeats you send. People can subscribe by email.

#Cron monitors

A monitor has a slug (nightly-export), a schedule, a check-in margin (how late a run may start) and a maximum runtime. You don't need to create it first: the first check-in that carries a schedule creates it, and later ones keep it up to date.

Setting Values Default
Slug lowercase letters, digits, - and _, up to 64 characters, starting with a letter or digit
Schedule a crontab (0 3 * * *) or an interval in minutes (1 to 10,080)
Check-in margin 1 to 1,440 minutes 5
Maximum runtime 1 to 1,440 minutes 30
Name 2 to 120 characters the slug

#Wrap a job

The wrapper sends in_progress when the job starts and ok or error with its duration when it ends. An exception marks the run as failed and is raised again, so your error handling is unchanged.

No example for this step; showing Node.js.

await apphelm.withMonitor("nightly-export", () => exportEverything(), {
  monitorConfig: { schedule: { type: "crontab", value: "0 3 * * *" }, checkinMarginMinutes: 10, maxRuntimeMinutes: 60 },
});
@apphelm.monitor("nightly-export", schedule="0 3 * * *", max_runtime_minutes=60)   # after apphelm.init
def nightly_export():
    ...

with apphelm.monitor("hourly-sync", schedule=60):   # an int is an interval in minutes
    sync()
val report = apphelm.withMonitor("nightly-report", MonitorConfig(MonitorSchedule.crontab("0 3 * * *"), maxRuntimeMinutes = 30)) {
    buildReport()
}
// Blocking: run it off the main thread, for example in a WorkManager worker.
Apphelm.client?.withMonitor("daily-sync", MonitorConfig(MonitorSchedule.interval(1440))) { syncEverything() }
try await apphelm.withMonitor("nightly-sync", monitorConfig: MonitorConfig(schedule: .crontab("0 3 * * *"), checkinMarginMinutes: 5, maxRuntimeMinutes: 30)) {
  try await syncEverything()
}
await apphelm.withMonitor('nightly-sync', () => syncEverything(),
    monitorConfig: ApphelmMonitorConfig(schedule: ApphelmMonitorSchedule.crontab('0 3 * * *'), maxRuntimeMinutes: 30));
err := client.WithMonitor(ctx, "nightly-report", &apphelm.MonitorConfig{
	Schedule:          apphelm.CrontabSchedule("0 3 * * *"),
	MaxRuntimeMinutes: 30,
}, func() error { return buildReport(ctx) })
APPHELM.with_monitor("nightly-billing",
  monitor_config: Apphelm::MonitorConfig.crontab("0 3 * * *", checkin_margin_minutes: 5, max_runtime_minutes: 30)) do
  bill_everyone
end
$apphelm->withMonitor('nightly-report', fn () => $report->run(),
    ['schedule' => '0 3 * * *', 'checkinMarginMinutes' => 10, 'maxRuntimeMinutes' => 60]);
await apphelm.WithMonitorAsync("nightly-report", () => BuildReportAsync(),
    new MonitorConfig { Schedule = MonitorSchedule.Crontab("0 3 * * *"), CheckinMarginMinutes = 5, MaxRuntimeMinutes = 30 });
apphelm.with_monitor("nightly-export", Some(MonitorConfig::crontab("0 3 * * *").max_runtime_minutes(30)), || export())?;
Apphelm.with_monitor("nightly-import", [monitor_config: [schedule: {:crontab, "0 3 * * *"}]], fn ->
  Importer.run()
end)
# Start
curl -X POST https://apphelm.dev/api/v1/check-ins \
  -H "Authorization: Bearer $APPHELM_API_KEY" -H "Content-Type: application/json" \
  --data '{"productId":"prd_…","monitor":"nightly-export","status":"in_progress","checkInId":"chk_2026110703a","monitorConfig":{"schedule":{"type":"crontab","value":"0 3 * * *"},"maxRuntimeMinutes":60}}'
# Finish
curl -X POST https://apphelm.dev/api/v1/check-ins \
  -H "Authorization: Bearer $APPHELM_API_KEY" -H "Content-Type: application/json" \
  --data '{"productId":"prd_…","monitor":"nightly-export","status":"ok","checkInId":"chk_2026110703a","durationMs":5400}'

With Oban, Apphelm.Telemetry.attach(oban: [cron: true]) checks in every job the Oban cron plugin starts, with no wrapper.

The browser and React Native SDKs have no check-ins: scheduled jobs run on servers.

#Check in from the command line

For a crontab entry, a shell script or a CI job, wrap the command with the CLI. It needs a server key in APPHELM_API_KEY with events:write.

# crontab: 0 3 * * *
npx @sansavision/apphelm monitors run nightly-export --product prd_… --schedule "0 3 * * *" --max-runtime 60 -- ./export.sh --full
  • It sends in_progress, runs the command (without a shell), then sends ok (exit code 0) or error with the duration, and exits with the command's exit code.
  • --schedule "<crontab>" or --interval <minutes> creates or updates the monitor. --margin and --max-runtime (1 to 1,440 minutes) are saved with the schedule, so they need one of them; without it, the CLI stops before running the job and says what to add.
  • A failed check-in is printed as [apphelm] … and never stops your job.
  • --json prints the result (monitor, status, exitCode, durationMs, checkInId).
  • apphelm monitors list --product prd_… shows each monitor's status, schedule, last check-in and next expected run (needs monitors:read).

The CLI checks the slug (lowercase), the schedule and the limits before it runs the job, so a value the server would refuse stops the command with the fix instead of running the job without a check-in. More commands are in the CLI reference.

#Check in by hand

When the start and the end happen in different places (a job queued in one process and finished in another), send the check-ins yourself. Give both the same checkInId (chk_ followed by 8 to 76 letters, digits, _ or -); the SDKs have a helper that makes one (newCheckInId() and similar).

No example for this step; showing Python.

apphelm.check_in("nightly-export", "in_progress", check_in_id=run_id)
apphelm.check_in("nightly-export", "ok", check_in_id=run_id, duration_ms=5400)
await apphelm.checkIn({ monitor: "nightly-export", status: "in_progress", checkInId: runId });
await apphelm.checkIn({ monitor: "nightly-export", status: "ok", checkInId: runId, durationMs: 5400 });
val id = newCheckInId()
apphelm.checkIn("sync", CheckInStatus.IN_PROGRESS, id, monitorConfig = MonitorConfig(MonitorSchedule.interval(15)))
apphelm.checkIn("sync", CheckInStatus.OK, id, durationMs = 1_840)
id := apphelm.NewCheckInID()
client.CheckIn(ctx, apphelm.CheckIn{Monitor: "sync", Status: apphelm.CheckInInProgress, ID: id})
client.CheckIn(ctx, apphelm.CheckIn{Monitor: "sync", Status: apphelm.CheckInOK, ID: id, Duration: time.Since(start)})
APPHELM.check_in("sync", "in_progress", check_in_id: id)
APPHELM.check_in("sync", "ok", check_in_id: id, duration_ms: 1840)
$id = 'chk_' . bin2hex(random_bytes(16));
$apphelm->checkIn('sync', 'in_progress', $id);
$apphelm->checkIn('sync', 'ok', $id, 1840);
var id = ApphelmClient.NewCheckInId();
await apphelm.CheckInAsync("sync", CheckInStatus.InProgress, id);
await apphelm.CheckInAsync("sync", CheckInStatus.Ok, id, TimeSpan.FromMilliseconds(1840));
let id = apphelm::monitor::new_check_in_id();
apphelm.check_in(CheckIn::new("sync", CheckInStatus::InProgress).check_in_id(&id))?;
apphelm.check_in(CheckIn::new("sync", CheckInStatus::Ok).check_in_id(&id).duration(Duration::from_millis(1840)))?;
id = Apphelm.new_check_in_id()
Apphelm.check_in("sync", "in_progress", check_in_id: id)
Apphelm.check_in("sync", "ok", check_in_id: id, duration_ms: 1840)
APPHELM_CHECKIN_ID=chk_2026110703a npx @sansavision/apphelm checkin prd_… nightly-export in_progress
APPHELM_CHECKIN_ID=chk_2026110703a npx @sansavision/apphelm checkin prd_… nightly-export ok

Retries are safe: an in_progress or a finish with the same id is recorded once and doesn't alert twice. A finish without an id closes the newest open run, or records a complete run when none is open. A check-in for an unknown slug without a schedule answers 404 monitor_not_found.

#How AppHelm decides a run failed

Status When
ok The job reported success
error The job reported failure
missed No check-in arrived by the expected time plus the margin
timeout A run stayed in_progress longer than the maximum runtime
in_progress A run is going

Missed and timed-out runs are found by a check every five minutes, so an alert can come up to about five minutes after the margin or runtime ends. When a run starts, the next expected run is computed from the schedule.

#Alerts for monitors

When a monitor moves from healthy to error, missed or timeout, AppHelm sends one monitor.failed alert (critical) to your notification channels and as a signed webhook. It doesn't repeat while the monitor keeps failing. The first ok after a failure sends monitor.recovered. A run's in_progress in between doesn't count as healthy: a wrapped job (withMonitor, monitors run) recovers on its first good run, and a wrapped run that fails again while the monitor is failing doesn't send a second monitor.failed.

A failing monitor also opens an incident. During a maintenance window for the product, runs are still recorded but alerts are held. Choose where alerts go in Alerts and notifications.

#Manage monitors

Monitors are on the Monitors tab of Errors, and on Reliability. Through the API:

Endpoint Scope
POST /api/v1/check-ins events:write
GET /api/v1/cron-monitors?productId=, GET /api/v1/cron-monitors/{id}, GET /api/v1/cron-monitors/{id}/check-ins monitors:read
POST, PATCH, DELETE /api/v1/cron-monitors… monitors:write (explicit-only; the key's creator must be an owner or admin; send an Idempotency-Key)

A product can have 100 monitors. Check-ins are kept for 30 days. Deleting a monitor deletes its check-ins.

#From Sentry

Sentry SDKs and sentry-cli monitors run pointed at an AppHelm DSN send check_in envelope items, which AppHelm maps to the same monitors. Crontabs in a time zone other than UTC are converted only when the conversion is exact (for example */5 * * * *, or an hour list in a zone with a whole-hour offset and no daylight saving); others are refused. Intervals up to a week work. Sentry's failure and recovery thresholds and its legacy HTTP cron endpoint are not supported. See Migrate from Sentry.

#Uptime checks

An uptime check requests one URL of a product on a schedule and records whether it answered as expected. Each product has one uptime check, and it feeds that product's status page. Set it up on Status pages (or Reliability) in the app, or through the API.

No example for this step; showing HTTP (curl).

curl -X POST https://apphelm.dev/api/v1/uptime-checks \
  -H "Authorization: Bearer $APPHELM_API_KEY" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" \
  --data '{"productId":"prd_…","url":"https://shop.example.com/health","intervalSeconds":300,
           "assertions":{"expectedStatus":[200],"maxResponseTimeMs":2000,"bodyContains":"ok"}}'
# 201, with the result of a first check in firstResult

Creating a check through the API also creates a private status page for the product if it has none. It runs once at once and returns the result.

#What is checked

The request is a GET with no custom headers or body, and redirects are not followed. With no assertions, any 2xx or 3xx answer passes.

Assertion Passes when
expectedStatus The status is one of up to 10 codes you list
maxResponseTimeMs The response headers arrive within 50 to 15,000 ms
header { name, contains } That header contains the text
bodyContains The body contains the text (1 to 200 characters)
jsonPath { path, equals } The JSON value at a path like $.status or $.checks[0].ok equals a string, number, boolean or null

The body is read up to 256 KB; a larger body fails the check. Failure messages never quote your response. Each request times out after 8 seconds.

#URL rules

  • HTTPS on port 443, up to 2,048 characters, with no user name or password in the URL. A bare domain gets https:// added.
  • Not allowed: localhost, IP addresses in private and reserved ranges, IPv6 literals, internal names (.local, .internal, .lan, .home, .test, .localhost, .invalid, .onion) and apphelm.dev itself.
  • Checks run from AppHelm's servers on Cloudflare. You can't pick regions.

#Intervals and plans

Plan Uptime checks Shortest interval
Free 1 per product, up to 5 5 minutes
Builder 1 per product, up to 20 5 minutes
Portfolio 1 per product, up to 100 1 minute
Scale 1 per product, up to 500 1 minute

intervalSeconds is 300 (the default) or 60. Asking for 60 seconds on a plan without it answers 403 uptime_interval_not_in_plan; over the limit answers 409 uptime_check_limit. Only enabled checks of live products count. Status pages themselves are free.

#Failures and alerts

  1. The first failed check marks the component Awaiting signal while AppHelm confirms it. Nothing is sent.
  2. Two failures in a row mark it major outage and send uptime.failed (critical): "name is down: host failed N checks in a row". If the only assertion that failed is maxResponseTimeMs (the answer was right but slow), it is marked degraded instead.
  3. The first pass after that marks it operational and sends uptime.recovered.

The public uptime percentage counts major outage time as down, so time a check spends failing lowers the uptime figure on your status page. Slow answers (degraded) count as up, as degraded performance does on most status pages.

During a maintenance window the component shows maintenance and no uptime alert is sent. If the target still fails when the window ends, you get a new alert.

#TLS certificate expiry

Once a day, AppHelm reads the expiry date of each enabled check's certificate and warns 30 days (info), 14 days (warning), 7 days (critical) and 0 days (expired) before it ends, once per threshold. A renewed certificate starts the warnings again. Alerts are certificate.expiring and certificate.expired.

The date is read from a TLS 1.2 handshake and the certificate is not validated (chain, signature or host name). It can't be read for a host behind Cloudflare's proxy or one that only speaks TLS 1.3. In those cases no warning is sent, so watch those certificates another way.

#Manage uptime checks

Endpoint Scope
GET /api/v1/uptime-checks, GET /api/v1/uptime-checks/{id} (with the last 24 hours), GET /api/v1/uptime-checks/{id}/results monitors:read
POST, PATCH (url, intervalSeconds, assertions, enabled), DELETE /api/v1/uptime-checks… monitors:write (explicit-only, owner or admin creator, Idempotency-Key)

Results are kept for 90 days. Deleting a check keeps the status page and its history. The MCP server can list monitors and read their history (apphelm_list_monitors, apphelm_get_monitor_history) but not change them.

#Heartbeats

A heartbeat is your service reporting its own status, for health an outside request can't see (a queue backlog, a dependency down). It sets the product's status page component directly.

npx @sansavision/apphelm heartbeat prd_… operational
npx @sansavision/apphelm heartbeat prd_… degraded "Card payments are slow"

No example for this step; showing Node.js.

await apphelm.heartbeat({ productId: "prd_…", status: "degraded", message: "Card payments are slow", responseTimeMs: 840 });
curl -X POST https://apphelm.dev/api/v1/status/heartbeat \
  -H "Authorization: Bearer $APPHELM_API_KEY" -H "Content-Type: application/json" \
  --data '{"productId":"prd_…","status":"operational","responseTimeMs":120}'
# 202 { "object": "status_heartbeat", "data": { "productId", "status", "responseTimeMs", "publicUrl", "receivedAt" } }
  • Scope: status:write.
  • Status: operational, degraded, major_outage or maintenance. message is up to 240 characters (a longer one is dropped); responseTimeMs 0 to 120,000.
  • Needs a status page: without one the answer is 404 status_page_not_found. Create the page in the app first.
  • Goes stale: if no heartbeat arrives in time the component shows Awaiting signal. The window is 5 minutes by default, or 11 minutes (5-minute uptime checks) and 3 minutes (1-minute checks) once an uptime check is set up.
  • No team alert: a heartbeat doesn't send uptime.failed. A degraded or major_outage heartbeat does open an incident and is emailed to the page's subscribers.

Node is the only SDK with a heartbeat method. Other languages post to the endpoint above.

#Status pages

Each product can have one status page. Create it on Status pages in the app: choose its public slug, display name and description. A new page is unpublished; only share links show it until you publish it.

  • Public page: https://apphelm.dev/status/<slug>. It shows the overall status (the worst component's), each component's daily bars and uptime percentage for the last 90 days, the last 12 status changes, and maintenance windows active now or starting within 14 days.
  • Statuses: Operational, Degraded, Major outage, Maintenance, and Awaiting signal (no recent check or heartbeat). The uptime percentage counts degraded and maintenance time as up, leaves out time with no reports, and is rounded down.
  • Manual status: owners and admins can set a status and a message of up to 240 characters by hand. A manual status never goes stale.
  • Embed: https://apphelm.dev/status/<slug>/embed is a small status card for an iframe. The app gives you the snippet:
<iframe src="https://apphelm.dev/status/<slug>/embed" title="Service status" sandbox="allow-popups" style="width:100%;height:148px;border:0"></iframe>

There are no status badges, JSON or RSS feeds, and no custom domains for status pages today.

#Subscribers

Visitors can subscribe to a published page by email:

  • Sign-up is protected against bots and asks the person to confirm by email; the link is valid for 48 hours.
  • Each email has a one-click unsubscribe link.
  • Updates are grouped: at most one email per page every 15 minutes, with the newest status change.
  • A page can have 10,000 subscribers.

Email is the only subscription channel. A privacy deletion by email address removes that person's subscriptions (Privacy).

#Incidents

AppHelm opens incidents on its own when:

  • a status component is degraded or in major outage,
  • a cron monitor fails, misses or times out, or
  • errors spike (at least 50 events in about 15 minutes and five times the previous six hours).

An incident is minor, or major for a major outage (including a failing uptime check) or after repeated failures. Incidents in the same product within 30 minutes, or in products that depend on each other, are grouped. An incident resolves after a few clean checks in a row. Incidents are listed on Reliability and through GET /api/v1/incidents and GET /api/v1/incidents/{id} (scope incidents:read).

Incidents are a record for your team. They don't notify anyone and are not shown on status pages; the alerts above do the notifying. You can't write incidents or incident updates by hand today: use the manual status and its message to tell users what is going on.

#Maintenance windows

Schedule a window at the bottom of Status pages before planned work. A window covers one product and has a title (3 to 120 characters), a message (up to 500), a start and an end. It may last up to 7 days and start up to 366 days ahead. Cancelling an active window ends it at once.

While a window is active:

  • the status page shows maintenance, and announces the window from 14 days before;
  • uptime alerts, cron monitor alerts and cron incidents are held;
  • checks and check-ins are still recorded.

A window does not hold error spikes, issue alerts or metric alerts. Windows are managed in the app only; there is no API for them.

#Best practices

  • Give every scheduled job a monitor, with the schedule in the check-in, so a job that never starts is reported as missed.
  • Set the maximum runtime a little above the job's normal duration, so a stuck job is reported as timeout, not hidden.
  • Point uptime checks at a health endpoint that checks what matters (the database, a queue) and answers quickly, and assert on its body or JSON.
  • Schedule maintenance windows before planned work, so nobody is paged for it.
  • Use the manual status message during an outage; it is what your users read.

#Troubleshooting

Symptom Likely cause What to do
404 monitor_not_found The first check-in for a slug had no schedule Send monitorConfig (or --schedule / --interval) with the check-in, or create the monitor first
422 invalid_check_in Wrong slug format, status or field Use a lowercase slug and in_progress, ok or error
422 schedule_never_runs The crontab never matches (for example 31 February) Fix the crontab
A job runs at the wrong hour The schedule was written in local time Write it in UTC
A monitor shows missed although the job ran Check-ins go to another product or slug, or the job starts later than the margin Check --product and the slug, or raise the margin
409 monitor_limit The product has 100 monitors Delete unused monitors
An uptime URL is refused It isn't HTTPS on port 443, or it is private or internal Use a public HTTPS address
403 uptime_interval_not_in_plan 60-second checks need Portfolio or Scale Use 300 seconds, or change plan
409 uptime_check_exists The product already has an uptime check Change it with PATCH instead
An uptime check fails on a redirect Redirects aren't followed and the assertion expects 200 Check the final URL, or add the 3xx code to expectedStatus
No certificate warnings The host is behind Cloudflare's proxy or only speaks TLS 1.3 Watch that certificate another way
404 status_page_not_found on a heartbeat The product has no status page Create one on Status pages
The status page shows Awaiting signal No check or heartbeat arrived in time Send heartbeats more often than the stale window, or check the uptime check is on