GUIDES · COPY-PASTE · FREE

Copy, paste, monitored.

Every guide below ends in a working snippet — a crontab line, a manifest, a unit file, a try/except — against the real ping API. Pick your environment, paste the block, and the next silent failure has a pager.

# the universal integration — everything else is variations: your-job && curl -fsS -m 10 --retry 3 -o /dev/null https://ping.lastping.dev/<your-monitor-id>

The ping API, in six lines

Every monitor has one URL; suffixes change the meaning. GET, HEAD, or POST — a POSTed body (up to 10 KB) is stored with the ping, and ?rid= pairs a start with its finish to record run duration, and ties a run's progress steps to it.

https://ping.lastping.dev/<id> → success https://ping.lastping.dev/<id>/start → run started (arms overrun detection) https://ping.lastping.dev/<id>/fail → explicit failure (alerts immediately) https://ping.lastping.dev/<id>/<code> → exit code: 0 = success, non-zero = fail https://ping.lastping.dev/<id>/log → attach a note; no state change https://ping.lastping.dev/<id>/step → progress inside a started run (needs ?rid=)

/step is the only suffix that reports progress rather than a result. It says "this run is still moving": it resets the monitor's stall clock and records the step on the run timeline, but it does not change the monitor's status, does not count as a check-in for silence detection, and never extends the run budget. It alerts only if you opt in by setting step_timeout_s on the monitor — leave it unset and steps are simply recorded. See hung-job detection for the full pattern.


Pick your environment

Heartbeats for things that run, probes for things that serve, and the alerting reference that shapes what lands in your channel.

Heartbeat · Linux

Cron jobs

The flagship one-liner: append a curl to the crontab line; failures, hangs, and vanished schedules all alert.

job && curl -fsS -m 10 --retry 3 …/<id>
Heartbeat · Kubernetes

Kubernetes CronJobs

A copy-paste manifest — success and failure pings from the job command, no operator, nothing installed in the cluster.

if /app/job.sh; then curl "$LASTPING_URL"; else …
Heartbeat · systemd

systemd timers

ExecStartPost pings success, OnFailure pings failure, absence covers the timer that stopped firing. Three unit files.

ExecStartPost=/usr/bin/curl -fsS …/<id>
Heartbeat · pattern

Backups

Start → work → success/fail, with the error log POSTed on failure and run duration recorded. The anti-horror-story.

curl …/start · pg_dump … · curl …/fail
Heartbeat · in code

Python

A try/except with requests or plain stdlib — ping on success, POST the exception on failure, re-raise for the exit code.

requests.post(f"{PING}/fail", data=str(exc))
Heartbeat · in code

Node.js

Built-in fetch, zero dependencies — ESM and CommonJS variants, with the stack trace attached to the fail ping.

await fetch(`${PING}/fail`, { method: "POST" … })
CI/CD · webhook

GitHub Actions

One signed webhook, zero YAML changes — catches failed, hung, and never-started runs, naming the step that broke.

Settings → Webhooks → workflow_run + workflow_job
CI/CD · webhook

GitLab CI

One Pipeline-events webhook, zero .gitlab-ci.yml changes — catches failed, pending-stuck, and never-started pipelines with failure detail.

Settings → Webhooks → Pipeline events
CI/CD · webhook

Jenkins

One Notification-plugin endpoint, no Jenkinsfile changes — catches failed, queue-stuck, and never-started builds, even a dead controller.

Job Notifications → JSON / HTTP
Probe · uptime

HTTP & uptime

LastPing polls your URL every 30 s–24 h: status code, latency, optional body keyword — with the exact reason on the incident.

status 500, expected 200 · body match failed
Reference · alerting

Alert events & templates

down, recovery, fail, every-run, success, started, blocked, note — the routing matrix and per-event message templates with 20 variables.

[LastPing] {check_name} {event} ({cause})

Languages & runtimes

Cloud & serverless

Data & workflow

CI/CD platforms

AI agents

Troubleshooting

Deciding between tools first? Read the honest comparisons with Healthchecks.io and Cronitor, see how LastPing monitors itself, or go straight to the full documentation.

FREE FOR INDIVIDUALS · FULLY HOSTED

Somewhere in your stack, a job is failing politely.

Every snippet on these pages is wired in minutes — and LastPing monitors itself the same way.