Skip to content

Proxmox VE (proxmox_node, proxmox_guest, proxmox_storage) ​

Three sensors that read a Proxmox VE cluster through its REST API with a read-only API token. Two more read what an administrator most often misses: proxmox_backup (the age of the newest backup and failed backup jobs) and proxmox_cluster (quorum and nodes online).

They were checked against a Proxmox VE 9.1 host, a single node with an LVM-thin and a directory storage, containers and virtual machines. Every value was compared with what the host itself reports (free, df, lvs, a container's cgroup, and the web interface's own API read with a password login). A three-node Proxmox VE 9.3 cluster with a shared LVM storage was also checked, healthy, with a node shut down, with a node powered off without warning and with quorum lost; its answers are recorded in the tests. NFS and Ceph storage and a disabled storage were not available: those answers are written by hand in the tests, and marked so there. Please report any difference.

What these sensors do not cover: ZFS pools and their health, HA state, and a node's swap, load and I/O wait. Watch the host's own disks and services over SSH or SNMP, and use REST (JSON) with the same token for anything else the API offers.

The token ​

Create a user and an API token with the Audit role only, on the path /:

sh
pveum user add monitor@pve
pveum acl modify / --users monitor@pve --roles PVEAuditor
pveum user token add monitor@pve probeward --privsep 0

--privsep 0 lets the token carry the user's permissions, which is the read-only PVEAuditor role. With privilege separation on (the default of the web interface), the token has no permissions of its own, and the role goes to the token and not to the user: pveum acl modify / --tokens 'monitor@pve!probeward' --roles PVEAuditor. Both forms were tried and read the same. A token with privilege separation on and no role is refused by the sensors with a message that names the missing privilege. The command prints the token's secret once. A token id needs at least two characters.

PVEAuditor is enough for all three sensors. They need Sys.Audit (the node), VM.Audit (the guests) and Datastore.Audit (the storages), which that role holds, on / or at least on /nodes/<node>, /vms and /storage. The sensors only read.

In Probeward create a credential of kind secret whose value is the whole token id and secret:

text
monitor@pve!probeward=00000000-0000-0000-0000-000000000000

Assign it as the secret credential of the device that stands for the Proxmox host, or a group above it. It is sent as Authorization: PVEAPIToken=<value> and is never shown again. Only a token is supported, not a user name and password.

The device's address is the node or cluster address that answers on the API port (8006).

Discovery ​

Discovery recognises a Proxmox host by the web interface on port 8006. Without a token it proposes a TCP check and a certificate check for that port and says that a token would find more. Offer the secret credential that holds the token (Discovery, step Credentials) and discovery reads the nodes, guests and storages with it, and proposes:

  • proxmox_node and proxmox_backup for each online node, proxmox_cluster once;
  • proxmox_storage for each enabled storage (a shared one once);
  • proxmox_guest for each guest. Running guests are selected. Stopped guests and templates are listed but not selected, so that a parked machine does not page; tick them in the results if you want them. A template is proposed with expect_running off.

Every proposed sensor pins the certificate that discovery saw (its fingerprint is in the sensor's tls_fingerprint and in the check line of the results), and the token that worked is stored as the device's secret credential. Discovery trusts that certificate for the scan because you asked it to look at this address; compare the fingerprint in the results with the one on the host if the network between is not yours. A second run proposes nothing new. A token without the role gets the same message as the sensors (... lacks Sys.Audit ...), and a refused token is reported with the reason; the next token offered is tried. Discovery does not guess nodes: a cluster is read from whichever node answers.

The certificate ​

Proxmox ships a certificate that its own certificate authority signed, which no system trusts. With the defaults (verify_tls on, no pin) a sensor therefore fails with a collection failure that says why and shows the fingerprint the server presented:

text
TLS error: the certificate is not trusted (self-signed, or issued by an authority this host does not know);
install its authority on the probe host, or turn off verify_tls. The server presented a certificate with the
SHA-256 fingerprint 12:34:...:EF; to trust exactly that certificate, set tls_fingerprint to it

Pin the certificate. This is the recommended way for a self-signed Proxmox. Read the fingerprint on a machine you trust, ideally on the Proxmox host itself (Datacenter, then the node, then System, Certificates, the pve-ssl.pem entry shows it too):

sh
openssl s_client -connect pve1.example.org:8006 </dev/null 2>/dev/null | openssl x509 -noout -fingerprint -sha256

and put it in the sensor's tls_fingerprint parameter, with or without colons, in either case. The connection is then accepted if and only if the certificate the server presents has that fingerprint: the chain, the dates and the name are not looked at, and verify_tls is not needed. A different certificate is refused before anything is sent, with a message that shows the fingerprint it presented and the pinned one, so you can compare them. After Proxmox renews its certificate (the self-signed one lasts 2 years; an ACME one every few months) the sensors fail the same way until you update the pin. See pinning a certificate.

The other ways: install a certificate the probe host trusts (an ACME certificate from Proxmox's Certificates page, or one from your own authority whose root is in the probe host's trust store) and keep verify_tls on; or turn verify_tls off, which still encrypts the connection and still needs the token, but no longer proves that the server is the one you meant. When verify_tls is on and the device has a host name, it is sent as the server name and has to match the certificate.

The TLS certificate sensor reads the certificate's dates even when it is untrusted, so a self-signed Proxmox certificate can still be watched for expiry.

Node (proxmox_node) ​

ParameterDefaultMeaning
noderequiredThe node's name in the cluster, for example pve1.
port8006API port.
verify_tlstrueCheck the API certificate, see above.
tls_fingerprintnonePin the API certificate, see above.
KeyNameUnitDefault limits
onlineOnlinenoneDown when offline (0)
cpu_pctCPU%warning above 85, error above 95
mem_used_pctMemory used%warning above 90, error above 97
mem_used_bytes, mem_total_bytesMemoryBnone
disk_used_pctRoot disk used%warning above 85, error above 95
disk_used_bytes, disk_total_bytesRoot diskBnone
uptime_sUptimesnone
api_msAPI response timemsnone

One request to /nodes. A node that the cluster reports offline is Down; its measurements are unknown (the cluster still lists the memory and disk sizes the node had when it was last seen). A token that can list the node but lacks Sys.Audit gets the node's name and status and nothing else from Proxmox; the sensor reports that as a collection failure naming the privilege, not as an online node with no figures. Memory is total minus available, as free shows it. The root disk is the file system that holds /; the storages have their own sensor. Suggested interval 60 seconds.

Guest (proxmox_guest) ​

A virtual machine or container, found by its id wherever it runs in the cluster, so migration does not break the sensor.

ParameterDefaultMeaning
vmidrequiredThe guest's id, 100 or more.
expect_runningtrueDown when the guest is not running. Turn off for a guest that is stopped most of the time.
port, verify_tls, tls_fingerprint8006, true, noneAs above.
KeyNameUnitDefault limits
statusStatusnone1 running, 0 stopped, 2 paused (warning), 3 other (warning)
cpu_pctCPU%warning above 90. No error limit: a guest that uses all of its CPUs for a while is busy, not broken.
mem_used_pct, mem_used_bytes, mem_total_bytesMemory%, Bwarning above 90, error above 97 for the percentage
disk_used_bytes, disk_total_bytesDiskBnone. A container reports its root file system. A virtual machine reports its boot disk's size only: Proxmox gives the cluster list no use figure for a virtual machine, so its use is unknown.
uptime_sUptimesnone
net_in_bps, net_out_bpsNetworkbit/snone. Rates from the cumulative counters.
disk_read_bps, disk_write_bpsDisk I/OB/snone. Rates from the cumulative counters.
api_msAPI response timemsnone

One request to /cluster/resources?type=vm, and a second to /cluster/resources?type=node to see whether the guest's node is up. A node that has crashed leaves its guests listed as running, with the figures they had; the sensor reads such a guest as status 3 (other) with every measurement unknown, and Down unless expect_running is off, and the message says that the node is offline. If the second request fails the guest is read from the first alone. The rates are unknown on the first poll and after the guest restarts, when its counters start from zero. CPU is the share of the guest's own CPUs, as the web interface shows it (a container with one core at full load reads 100). A container's memory leaves out its file cache. A virtual machine's is what Proxmox reports for it, which for a machine without the balloon driver can be most of what it was given. A stopped guest is Down unless expect_running is off; its CPU, memory use and uptime are unknown. Suggested interval 60 seconds.

Storage (proxmox_storage) ​

ParameterDefaultMeaning
noderequiredA node that has the storage. For shared storage any node will do.
storagerequiredThe storage id.
port, verify_tls, tls_fingerprint8006, true, noneAs above.
KeyNameUnitDefault limits
activeActivenoneDown when 0
used_pctSpace used%warning above 85, error above 95
used_bytes, free_bytes, total_bytesSpaceBnone
api_msAPI response timemsnone

One request to /nodes/{node}/storage/{storage}/status. A storage that is disabled or not active is Down. The percentage is used over total, as Proxmox shows it; on a directory storage it reads a few points lower than df, which leaves out the blocks reserved for root. Suggested interval 300 seconds. node and storage go into a URL path, so only letters, digits, -, _ and . are accepted.

Failures ​

Every message names the cause and none contains the token. A collection failure keeps the last reading and counts towards an incident; a Down is a reading.

MessageKindMeaning
Proxmox refused the token (HTTP 401): the token id or secret is wrong, the realm is wrong, or the token has expired or been revokedauth_failedProxmox gives the same empty answer for all of these, so the message lists them.
Proxmox denied the request (HTTP 403): Permission check failed (/storage/local, Datastore.Audit|Datastore.AllocateSpace)auth_failedThe token is valid but lacks the privilege Proxmox names.
the token sees node "pve" but not its figures: it lacks Sys.Audit ...auth_failedThe node sensor, with a token that has no role.
the secret is not an API token in the form user@realm!tokenid=secretconfigThe credential is not a token.
no secret credential is set for this sensor, its device or any group above itconfigNo secret credential is assigned or inherited.
the cluster does not list a node named "..."protocolWrong node name.
no guest with id N is visible to this token (deleted, or the token lacks VM.Audit on it)protocolThe guest was deleted, never existed, or the token cannot see it. A guest that is only stopped is not this: it is Down.
the Proxmox API answered HTTP 400: Parameter verification failed. (storage: No such storage.)protocolA storage id that does not exist. Proxmox's own explanation is added to every error status.
the Proxmox API answered HTTP 500: hostname lookup 'x' failed ...protocolA node name for a storage sensor that the host cannot resolve.
TLS error: the certificate is not trusted ...protocolSee the certificate. The message shows the fingerprint the server presented.
TLS error: the server presented a certificate with the SHA-256 fingerprint A, which is not the pinned BprotocolThe pin does not match: the certificate was renewed, or something else answers. Compare, then update tls_fingerprint.
TLS error: the port does not speak TLS (the server answered something else)protocolThe port is not the API's.
cannot connect: connection refused, cannot connect: no route to hostunreachableNothing listens on the port, or the host is not there.
no complete HTTP response within N mstimeoutThe host did not answer in time.
the Proxmox node could not reach the node you asked aboutunreachableThe API answered 595 or 596: the node asked about is down.

The backup and cluster sensors have their own messages on their pages.

AGPL-3.0-only