Metrics and badges
Control what the page shows, and expose badges and Prometheus metrics.
metrics does two jobs: it decides which numbers the UI renders, and it
enables the two machine-readable surfaces — SVG badges and a Prometheus
exposition.
Defaults to true. Shows the most recent latency on monitor cards.
Defaults to true. Renders the latency sparkline.
Defaults to true. Shows the uptime meters.
Defaults to all four. Which meters appear, in order. No duplicates.
Defaults to true. Serves /badge/:name.svg.
Defaults to false. Serves /metrics when enabled.
The first four options are presentation only — the data is always computed and
always available over the API. They are forwarded to the UI through the
metrics prop:
A 90d meter can only report what exists. With
checks.displayDays: 30 the 90-day value covers 30 days of
history, because nothing older is read.
Badges
| Query | Values | Default |
|---|---|---|
metric | status, uptime, latency | status |
period | 24h, 7d, 30d, 90d | 24h (uptime only) |
label | any string | the monitor name, or status |
The reserved name overall renders the page-level state. Percent-encode names
containing spaces: /badge/Web%20App.svg.
Badges are SVG, served with cache-control: public, max-age=60, which keeps
an embedded badge fresh without turning every README view into a database
read. Colours follow the value: green above 99.9% uptime or healthy, amber
above 95% or degraded, red below, grey when there is no data.
With badges: false, the route answers 404.
Prometheus
Set prometheus: true to register /metrics, served as
text/plain; version=0.0.4.
| Metric | Labels | Meaning |
|---|---|---|
heyo_status_up | monitor, type, group | 1 operational, 0 failing. |
heyo_status_latency_milliseconds | monitor, type, group | Latency of the most recent check. |
heyo_status_uptime_ratio | monitor, period | Uptime per period, 0–1. |
heyo_status_last_check_timestamp_seconds | monitor | Unix time of the last check. |
heyo_status_overall | state | One-hot overall state. |
heyo_status_monitors | — | Number of public monitors. |
heyo_status_active_incidents | — | Count of active incidents. |
heyo_status_scheduled_maintenances | — | Count of scheduled or running windows. |
heyo_status_snapshot_timestamp_seconds | — | When the snapshot was generated. |
Only aggregate, already-public data is exposed: no incident text, no monitor
targets, and nothing from a private monitor.
The exposition is not behind the admin token. If a scrape endpoint should
not be world-readable, keep prometheus: false and read the same
numbers from /status behind your own gateway, or restrict the
path at the edge.
Generate the same exposition yourself from any snapshot: