banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Virtualization

banshee/virtualization-collection/virtualization/proxmox/https/

replication

The state, failures and lag of each storage replication job of a Proxmox VE cluster by its API.

  • virtualization
  • proxmox
  • pve
  • replication
  • zfs
  • https
  • api

par banshee1 installation1 version

v1Dernière

Publiée le 27 octobre 2026. First version.

Storage replication of a Proxmox VE cluster, by its API

Returns, for each storage replication job of a Proxmox VE cluster (the ZFS replication of a guest to another node), its state, its failures in a row and the time since its last good run, read from the Proxmox VE API behind an API token. Three watches are offered, each one set on the probe.

Versions

Proxmox VE from 6.2, the first to give API tokens; the routes read have kept their form since. Generic: no folder of version.

How it works

The token goes in the header Authorization: PVEAPIToken=<token> of each request.

  1. GET https://<host:address>:8006/api2/json/nodes: the nodes and their state.
  2. GET https://<host:address>:8006/api2/json/nodes/<node>/replication for each node online: the jobs of the guests that node holds.
{"data": [{"id": "101-0", "guest": 101, "jobnum": 0, "target": "pve2", "schedule": "*/15", "last_sync": 1793062800, "last_try": 1793062800, "fail_count": 0, "duration": 4.2}]}
  • A job is named by its id, <guest id>-<job number> (101-0), as Proxmox VE names it.
  • The state is ok, failing when its failures in a row (fail_count) are above 0 (the job then also carries its error), or disabled for a job disabled in Proxmox VE, which returns its state alone and raises nothing.
  • The time since the last good run is the time since last_sync, in minutes; a job that never ran well has none.
  • A cluster without replication returns no value, and raises nothing.
  • No node at all stops the collector misconfigured. A code 401 (the token refused) or 403 (a privilege missing) stops it misconfigured; any other code but 200 stops it unreachable, a node that does not answer its jobs included, rather than leaving its jobs out.

The token comes from protocol:http:token, a secret variable: it only goes in the header. The answers are not secret.

Prerequisites

  • The address of any node of the cluster as the host's address, reachable from the poller in HTTPS on port 8006, or the port set in the variable proxmox:port when a proxy serves the API on another. The certificate of the node is issued by the cluster's own authority: trust it by that authority (/etc/pve/pve-root-ca.pem) under protocol:tls:authorities, by its pinned fingerprint in protocol:http:fingerprint, or by the first fingerprint trusted in the tab "Security".
  • An API token in protocol:http:token, written <user>@<realm>!<token id>=<secret>, of a user given the role PVEAuditor, read-only, on /: see the collector proxmox/https/nodes for the three pveum commands. A job is listed when the token may audit its guest (VM.Audit).

Variables

NameLabelSaysDefault
proxmox:portAPI portthe port of the Proxmox VE API8006

Outputs

NameLabelUnitPer instance
stateState—yes, per job
failuresFailures in a row—yes, per job
lagTime since the last good runminyes, per job

Watches

NameTitleKindDefaultsChecked by default
failingReplication failingstate to avoid, on statecritical on failing, for 2 runsyes
lateReplication lateabove a threshold, on lagwarning above 60 min, critical above 240 minyes
missingReplication job missingexpected instances, on stateno job named: it raises nothing until names are set on the probeno

Limits

  • The jobs of the guests of a node that is not online are not listed: "Node not online" of proxmox/https/nodes says it, and "Replication job missing" sees them gone.
  • "Replication late" counts from the last good run, whatever the schedule of the job: a job set to run once a day needs its own probe, with its own thresholds.
  • The address is written into the URL as is: an IPv6 address must be given as a name.
  • Not checked against a Proxmox VE: the schema of the API viewer gives no field for this route; the fields are those its source writes (PVE/API2/Replication.pm, PVE/ReplicationState.pm) and its web interface reads (www/manager6/grid/Replication.js).