banshee/virtualization-collection/virtualization/proxmox/https/
backups
The number of backups kept and the age of the newest for each guest of a Proxmox VE cluster by its API.
by banshee1 installation1 version
Published on October 27, 2026. First version.
Backups of the guests of a Proxmox VE cluster, by its API
Returns, for each virtual machine and container of a Proxmox VE cluster, or of a single Proxmox VE server, the number of backups kept and the age of the newest, read in the storage that holds backups (a directory, NFS, CIFS, a Proxmox Backup Server) through the Proxmox VE API, behind an API token. A backup that failed leaves no archive: the age of the newest grows, and says it. 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.
GET https://<host:address>:8006/api2/json/cluster/resources?type=storage: each storage as each node sees it. Those whose content includesbackupare read; a shared one ("shared": 1) once, from the first node that reads it, a local one on its node.GET https://<host:address>:8006/api2/json/nodes/<node>/storage/<storage>/content?content=backupfor each of them:
{"data": [{"volid": "nfs-backup:backup/vzdump-qemu-101-2026_10_26-01_00_03.vma.zst", "vmid": 101, "ctime": 1793062803, "size": 2147483648, "format": "vma.zst"}]} GET https://<host:address>:8006/api2/json/cluster/resources?type=vm: the guests that exist now.
- A guest is named by its id (VMID:
101), as inproxmox/https/guests. - The backups kept are the archives of the guest in every backup storage read; the age of the newest is the time since its
ctime, in hours. A guest with no backup returns0and no age. - A backup storage that no node could read (not available, or answering another code than 200: a backup server down) counts in "Backup storage unread": the backups it holds are then missing from the count and the ages, which may raise "Newest backup too old" for that reason.
- A code 401 (the token refused) stops the collector
misconfigured, a code 403 on the lists too; any other code but 200 on the lists stops itunreachable.
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:portwhen 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) underprotocol:tls:authorities, by its pinned fingerprint inprotocol: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 collectorproxmox/https/nodesfor the threepveumcommands. Listing the content of a storage asksDatastore.Auditon it, which PVEAuditor gives.
Variables
| Name | Label | Says | Default |
|---|---|---|---|
proxmox:port | API port | the port of the Proxmox VE API | 8006 |
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
backups | Backups kept | — | yes, per guest |
age | Age of the newest backup | h | yes, per guest |
unread-storage | Backup storage unread | — | no |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
none | No backup | below a threshold, on backups | critical below 1 | yes |
old | Newest backup too old | above a threshold, on age | warning above 30 h, critical above 54 h: a daily backup missed once, then twice | yes |
unread | Backup storage unread | above a threshold, on unread-storage | warning above 0 | yes |
Limits
- Every guest is judged, those never meant to be backed up and the templates included: leave them out by the selection of the probe (Guests: All except
9000,90*). A guest backed up weekly needs its own probe, with its own thresholds. - The failure of a backup job is not read here: its trace is the age that grows. The result of the last backup job of each node is the collector
proxmox/https/backup-tasks. - One listing per backup storage at each run: on a Proxmox Backup Server that keeps many backups, the listing is long.
- 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 routes and fields are those of the API viewer of Proxmox VE (
pve-docs/api-viewer) and of its source (PVE/API2Tools.pm, which writessharedandcontentfor each storage).