banshee is under active development: collectors will keep changing, and a version you publish will likely need adjustments. For stable use, wait for version 1.0.0.

Virtualization

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

backup-tasks

The result of the last backup job of each node of a Proxmox VE cluster, and the time since, by its API.

  • virtualization
  • proxmox
  • pve
  • backup
  • vzdump
  • task
  • https
  • api

by banshee1 installation1 version

v1Latest

Published on October 27, 2026. First version.

Last backup job of each node of a Proxmox VE cluster, by its API

Returns, for each node of a Proxmox VE cluster, or for a single Proxmox VE server, the result of its last backup job (vzdump) and the time since it ended, 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>/tasks?typefilter=vzdump&limit=1 for each node online. The node reads its task archive from the newest: the answer is its last backup job that ended, a running one left out:
{"data": [{"upid": "UPID:pve1:…", "type": "vzdump", "status": "OK", "starttime": 1793062800, "endtime": 1793066412, "user": "root@pam"}]}
  • A node is named as the cluster names it.
  • The result is ok for the status OK, warnings for WARNINGS: <n> (a guest backed up with warnings), and failed for anything else: the status is then the error that ended the job (job errors, interrupted by signal).
  • The time since the job ended is in hours.
  • A node that is not online, one that never ran a backup job, or one that answers its tasks with another code than 200 (gone offline between the two readings) returns no value.
  • 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 on the list of the nodes stops it unreachable.

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. The backup jobs run as root@pam: seeing the tasks of another account asks Sys.Audit on the node, which PVEAuditor gives; without it, the list is empty and the collector returns nothing.

Variables

NameLabelSaysDefault
proxmox:portAPI portthe port of the Proxmox VE API8006

Outputs

NameLabelUnitPer instance
resultResult of the last backup job—yes, per node
ageTime since the last backup jobhyes, per node

Watches

NameTitleKindDefaultsChecked by default
failedBackup job failedstate to avoid, on resultwarning on warnings, critical on failedyes
oldNo backup job latelyabove a threshold, on agewarning above 30 hno
missingNode without backup jobexpected instances, on resultno node named: it raises nothing until names are set on the probeno

Limits

  • Only the last job of each node is judged: a job that failed, followed by one that succeeded, raises nothing. Which guest failed in a job is read in its log, in Proxmox VE.
  • A job run by hand counts like a scheduled one.
  • The age of each guest's newest backup is the collector proxmox/https/backups, which sees a guest left out of a job that itself succeeded.
  • 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, fields and statuses are those of the API viewer of Proxmox VE (pve-docs/api-viewer) and of its source (PVE/API2/Tasks.pm, which reads the archive from the newest).