Metrics
Prometheus metrics scrape endpoint
Returns the authenticated project's checks as Prometheus gauges in Prometheus text exposition format 0.0.4.
Metrics emitted (per check, labelled id, name, slug):
- lastping_check_up — 1 if status is up, else 0
- lastping_check_state{state="up|late|down|new"} — one-hot gauge for current state
- lastping_check_last_ping_timestamp_seconds — unix seconds of last ping (omitted when never pinged)
- lastping_check_due_timestamp_seconds — unix seconds of next expected ping (omitted if null)
- lastping_check_grace_seconds — grace period in seconds
- lastping_check_paused — 1 if paused, else 0
- lastping_checks — count of checks in the project
Authentication: accepts either X-Api-Key: lp_… or Authorization: Bearer lp_… (the Bearer form is provided specifically for Prometheus scrape_config).
Example Prometheus scrape_config:
scrape_configs:
- job_name: lastping
scrape_interval: 60s
authorization:
credentials: lp_YOUR_API_KEY
static_configs:
- targets: [app.lastping.dev]
metrics_path: /api/v1/metrics
scheme: https
get/api/v1/metrics
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/metrics
- Auth: one of:
- API key in header X-Api-Key
- HTTP bearer
Response
Prometheus text exposition (format 0.0.4). Content-Type is text/plain; version=0.0.4; charset=utf-8.
Changes
No recorded changes to this operation across all 2 revisions of this API.