Prometheus metrics

On this page

Each project exposes its checks as Prometheus gauges, so you can chart and alert on them next to the rest of your infrastructure. The endpoint takes a read-only key, in the path or as a Bearer token.

How do I scrape it?

endpoints
# key in the path
YOUR_API_BASE_URL/projects/<project id>/metrics/<read-only key>

# or the key as a Bearer token, for scrapers that refuse public URLs in config
YOUR_API_BASE_URL/projects/<project id>/metrics
Authorization: Bearer <read-only key>
prometheus.yml
scrape_configs:
  - job_name: cronmissed
    scheme: https
    metrics_path: /projects/<project id>/metrics
    authorization:
      credentials: <read-only key>
    static_configs:
      - targets: ['YOUR_API_BASE_URL']

Which metrics are there?

MetricMeaning
cronmissed_check_up1 when the check is up or late, 0 when it is down; labels name, tags and unique_key
cronmissed_check_started1 when a run has started and not finished
cronmissed_check_grace1 when the check is late and inside its grace time
cronmissed_check_paused1 when the check is paused
cronmissed_tag_up1 when no check with the tag is down; label tag
cronmissed_checks_totalNumber of checks in the project
cronmissed_checks_downNumber of checks that are down

What should I alert on?

An alert rule on cronmissed_check_up == 0 mirrors the dashboard. Use cronmissed_checks_down > 0 for a single rule for the whole project. Responses are not cached, so each scrape sees the current state.

Try it on one job

Create a check, copy its ping URL into the job, and watch the first ping arrive.

Start monitoring