Proxmox VE backups (proxmox_backup)
How old the newest successful backup of a guest (or of every guest of a node) is, how big it was, and whether backup jobs failed lately. A backup job that fails every night, or a guest that nobody added to a job, is the classic thing a Proxmox administrator finds out about when a restore is needed.
Where the figures come from, and what a read-only token can see
The sensor reads the node's backup task history (/nodes/{node}/tasks?typefilter=vzdump) and the log of each task (/nodes/{node}/tasks/{upid}/log). It does not read the backup storages.
That is a decision made against a real Proxmox VE 9.1 host, with a token that has only the PVEAuditor role:
| What | Readable with PVEAuditor? |
|---|---|
The node's task list, including vzdump tasks, their status, start and end | Yes (Sys.Audit) |
| A task's log: which guests a job backed up, and each archive's size | Yes |
The list of backup storages (/nodes/{node}/storage?content=backup) | Yes |
A storage's backup volumes (.../storage/{id}/content?content=backup) | No: the list is empty although backups exist. Proxmox shows a backup volume only to a user with VM.Backup on the guest or Datastore.Allocate on the storage, and those roles also let the user take and restore backups |
Which guests no backup job covers (/cluster/backup-info/not-backed-up) | Yes (not used) |
A monitoring token that may not change anything is therefore blind to the archives themselves, and the sensor works from the history of the jobs instead. What that means in practice:
- The age is the age of the newest backup task that finished successfully for the guest. It is not proof that the archive is still there: a retention setting or a person may have removed it, and the sensor does not see that.
- For a task that backed up one guest, the time is the task's end. A job that covered several guests has no end time per guest, so the time is the start of the job, which is the safe, older answer by up to the job's duration.
- The size is Proxmox's own
archive file sizeline from the log (214MB): rounded, in binary multiples, and absent for a backup server target, where the size is unknown. - A guest counts only if the history shows a success within
history_days. Proxmox keeps task history for a limited time; if yours is shorter than the interval between your backups, raise the retention or accept "no backup".
The privileges needed are Sys.Audit (tasks and logs) and VM.Audit (the guest list), both in PVEAuditor. The sensor only reads.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
node | required | The node whose guests and backup tasks are read. |
vmid | none | One guest, by its id. Without it every guest on the node is checked. |
exclude_vmids | none | Guests that are deliberately not backed up, for the all-guests form (up to 200). Not allowed together with vmid. |
lookback_hours | 48 | How far back failed jobs are counted, 1 to 720. |
history_days | 14 | How far back the history is searched for a guest's newest successful backup, 1 to 90. |
port, verify_tls, tls_fingerprint | 8006, true, none | As for the other Proxmox sensors. |
Credential: a secret holding the API token. Suggested interval: 1 hour; a daily job does not need more. At most 40 task logs are read per poll.
Guests that are not meant to be backed up
Say so on the sensor, with exclude_vmids: a test machine, a template-like VM, a guest whose data lives elsewhere. Proxmox's own exclusion is not read: it is a setting of each backup job (a list of included or excluded guests, a pool, "all"), several jobs can overlap, and a guest left out of every job is exactly the mistake this sensor exists to catch, so a guest left out of a job still counts as one with no backup. Templates are skipped automatically.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
newest_age_h | Age of the newest backup | h | warning above 26, error above 50. For several guests it is the stalest guest's, so one neglected guest is enough. Unknown when no guest has a backup. |
failed_jobs | Failed backup jobs | none | warning above 0 |
last_job_ok | Last backup job | none | Down when it failed (0). Unknown when no job ran in the window. |
last_size_bytes | Size of the last backup | B | none. The newest backup of the guest, or the newest of all the guests checked; unknown when the log has no size. |
guests_checked | Guests checked | none | none |
guests_without_backup | Guests without a backup | none | none: the sensor is Down while it is above 0. |
api_ms | API response time | ms | none |
The limits suit daily jobs: a run that is a little late is a warning (26 hours), a missed run is an error (50 hours). Change them on the sensor for weekly jobs. A failed job is counted for the node, and for one guest when the task was that guest's or a job that covered several guests (its task has no guest id, so the failure may be about it).
What it says
A guest with no backup at all is a clear state and not a silent pass: the sensor is Down and names the guests, for example no successful backup in the last 14 days of ct-gateway (100), vm-router (101), vm-desktop (102), ... and 4 more; 1 failed job(s) in 48 h. Otherwise: newest backup of test-debian (9000) finished 1.0 h ago, last backup about 214 MiB; no failed job in 48 h, or for several guests 2 guests backed up, the stalest is test-debian (9000) at 1.0 h ago ....
Failures
| Message | Meaning |
|---|---|
no guest with id N on node "x" is visible to this token (...) (kind protocol) | One guest was asked for and it is not on the node. |
| Authentication, permission, certificate and connection failures | As for the other Proxmox sensors. A token without Sys.Audit cannot read the history. |
Verification
Run against a real Proxmox VE 9.1 host with a PVEAuditor token. Test containers were backed up with vzdump to the local storage: one alone, two in one job, and one backup that failed straight away (a bad --tmpdir). The sensor read the age and size of the single-guest and the multi-guest backups, counted the failed job, reported the guest whose only backup failed and a guest in no job as having no backup, and honoured exclude_vmids. The same host showed that the auditor's content listing is empty, which is why the sensor does not use it. Not seen: a backup server target, a retention job removing an archive, a cluster with several nodes.