Browse documentation

Pharos / Docs / v1.0.0

Prometheus metrics

Updated 2026-10-09 · Pharos 1.0.0

Pharos has a metrics endpoint in the Prometheus text format. It gives the current status and the uptime of every enabled component of a status page, so you can chart or alert on them next to your other metrics. It needs an API token; a Read token is enough.

curl -s https://status.example.com/metrics \
  -H "Authorization: Bearer $PHAROS_TOKEN"
MetricTypeValue
pharos_component_statusgauge1 operational, 2 degraded, 3 partial outage, 4 major outage, 5 maintenance.
pharos_component_uptime_ratiogaugeThe share of measured seconds that were up over the last 30 UTC days, from 0 to 1. NaN when nothing was measured.
# HELP pharos_component_status Current component status (1 operational, 2 degraded, 3 partial outage, 4 major outage, 5 maintenance).
# TYPE pharos_component_status gauge
pharos_component_status{component_id="7",name="API"} 1
# HELP pharos_component_uptime_ratio Fraction of observed seconds up over 30 UTC days; NaN means no observations.
# TYPE pharos_component_uptime_ratio gauge
pharos_component_uptime_ratio{component_id="7",name="API"} 0.999306

Every series has two labels, component_id and name. Targets, check messages and credentials are never part of the output. Up to 5000 components are included.

Addresses

  • /metrics and /api/v1/metrics give the first status page.
  • /status/{slug}/metrics and /api/v1/pages/{slug}/metrics give another page, with a token of that page.
  • Use the main address of the installation. A custom domain of a status page does not accept API tokens.
  • The endpoint is limited to 60 requests per minute, which is plenty for a scrape every 30 or 60 seconds.

A scrape job needs the token as a bearer token and the path, nothing else:

scrape_configs:
  - job_name: pharos
    scheme: https
    metrics_path: /metrics
    authorization:
      credentials: "<token>"
    static_configs:
      - targets: ["status.example.com"]

Hidden services are included here, unlike on the public page: the token is what decides who may read. Disabled components are left out.