On this page

10.6 Metrics for Prometheus and Zabbix

The server publishes key figures at /metrics in the Prometheus text format. Prometheus reads them directly; Zabbix reads them through an item of the type HTTP agent. Access is protected by metrics tokens, which only admins manage.

Access and tokens

/metrics requires a bearer token of the form Authorization: Bearer pdcm_… as soon as a token is required. Without a valid token the server answers with 401 and the header WWW-Authenticate: Bearer realm="pdc-metrics". API tokens (pdc_…) and sessions are not accepted there; conversely, metrics tokens do not work for the API.

A token is required when either condition holds:

  • server.toml contains [metrics] require_token = true. New installations write this on first start.

  • An admin switched on Require a token in the settings. What server.toml requires cannot be switched off there (the interface reports a conflict).

An existing server.toml without a [metrics] section leaves /metrics open. The dashboard then warns that anyone who reaches the server can read the metrics until a token is required.

Managing tokens

Under Settings in the Metrics access section ("/metrics for Prometheus and Zabbix"), an admin creates and manages tokens:

  1. Under the field with the Scrape address, enter a name (1 to 100 characters, for example zabbix) and choose Create token.

  2. Copy the token from the Metrics token field. It is shown only once; only its SHA-256 value is stored.

  3. Enter the token in the scraper (see below), then switch on Require a token. If no active token exists yet, the interface asks first, because scrapers stop working until they send one.

The table shows Name, Prefix (the first 12 characters), Created, and Last used. A valid token updates "Last used" even while no token is required yet, so you can check that the scraper works before switching over. Revoke… and the confirmation Revoke (Keep cancels) disable a token for good; Show revoked also lists revoked tokens. Tokens can only be created in a session, not with an API token. Creating, revoking, and switching Require a token are recorded in the audit log (metrics_token.created, metrics_token.revoked, metrics.require_token).

Settings: four-eyes approval and metrics access
Settings: four-eyes approval and metrics access

Setting up the scraper

The scrape address is https://<server>:8443/metrics (port and scheme as for the web interface; the settings page shows the address).

Prometheus:

scrape_configs:
  - job_name: pdc-backup
    scheme: https
    metrics_path: /metrics
    authorization:
      credentials: pdcm_…
    static_configs:
      - targets: ["backup-server:8443"]

Zabbix: an item of the type HTTP agent with the URL https://<server>:8443/metrics, request type GET, and in the Headers field the entry Authorization with the value Bearer pdcm_…. Dependent items evaluate the raw data with the "Prometheus pattern" preprocessing, for example pdc_protection_status{agent_id="…"}.

Separate address for /metrics

With [metrics] listen = "127.0.0.1:9101" the server serves /metrics only at this address (HTTPS with the server certificate, nothing else). The web port then answers /metrics with 404. A change requires a server restart.

Metrics

Labels contain IDs only, never names. Times are Unix timestamps in seconds.

Metric

Meaning

pdc_agents_active

Enrolled agents that are not revoked.

pdc_agents_online

Agents with a live connection.

pdc_agents_revoked

Revoked agents.

pdc_runs_running

Runs in progress.

pdc_runs_total{kind,status}

Counter of runs by kind and status (from the catalog; run logs expire, runs stay).

pdc_runs_active{status}

Open runs by status.

pdc_jobs{kind}

Jobs by kind.

pdc_jobs_failing

Enabled jobs whose last run failed.

pdc_job_last_run_ok{job_id,kind}

Result of a job's last run.

pdc_job_last_success_timestamp_seconds{job_id,kind}

Time of the last successful run.

pdc_job_next_run_timestamp_seconds{job_id,kind}

Time of the next scheduled run.

pdc_snapshots

Snapshots in all repositories (catalog cache).

pdc_repository_stored_bytes{repository_id,kind}

Stored bytes per repository.

pdc_repository_snapshots{repository_id,kind}

Snapshots per repository.

pdc_repository_free_bytes{repository_id}

Free space of the volume.

pdc_repository_used_ratio{repository_id}

Fill level of the volume as a share from 0 to 1.

pdc_repository_full_timestamp_seconds{repository_id}

Forecast time at which the repository is full (see section 10.3 Reports).

pdc_protection_status{agent_id}

Protection status per agent: 2 green, 1 yellow, 0 red.

pdc_protection_agents{status}

Number of agents per protection status.

pdc_agent_last_restore_point_timestamp_seconds{agent_id}

Newest snapshot of the agent in any repository.

pdc_holds_active

Active retention holds (see section 10.5 Ransomware early warning).

pdc_alerts_active

Raised conditions (agent offline, repository full, certificate expiry).

pdc_ransomware_warnings_total

Backups that raised a ransomware warning.

pdc_server_keeping_awake

1 while the server keeps Windows awake for running jobs.

pdc_server_uptime_seconds

Seconds since the server started.

pdc_server_certificate_expiry_timestamp_seconds

Expiry of the server's TLS certificate.

pdc_ca_certificate_expiry_timestamp_seconds

Expiry of the internal CA certificate.

Configuration in server.toml

Option

Effect

Default

require_token

/metrics requires a metrics token. New installations write true.

false if the section is missing

listen

Separate HTTPS address for /metrics only, for example 127.0.0.1:9101. The web port then no longer serves /metrics.

not set

[metrics]
require_token = true
listen = "127.0.0.1:9101"

Last updated Nov 15, 2026