README.md
September 25, 2025 ยท View on GitHub

- type: custom-api
title: Proxmox-VE Stats
cache: 1m
url: https://${PROXMOXVE_URL}/api2/json/cluster/resources
allow-insecure: true
headers:
Accept: application/json
Authorization: PVEAPIToken=${PROXMOXVE_KEY}
template: |
<div class="flex flex-column gap-5">
<div class="flex justify-between text-center">
<div>
{{ $nodes_online := len (.JSON.Array "data.#(type==\"node\")#|#(status==\"online\")#") }}
{{ $nodes_total := len (.JSON.Array "data.#(type==\"node\")#") }}
<div class="color-highlight size-h3">{{ $nodes_online }}/{{ $nodes_total }}</div>
<div class="size-h5 uppercase">Node</div>
</div>
<div>
{{ $lxc_running := len (.JSON.Array "data.#(type==\"lxc\")#|#(status==\"running\")#|#(template==0)#") }}
{{ $lxc_total := len (.JSON.Array "data.#(type==\"lxc\")#|#(template==0)#") }}
<div class="color-highlight size-h3">{{ $lxc_running }}/{{ $lxc_total }}</div>
<div class="size-h5 uppercase">LXC</div>
</div>
<div>
{{ $qemu_running := len (.JSON.Array "data.#(type==\"qemu\")#|#(status==\"running\")#|#(template==0)#") }}
{{ $qemu_total := len (.JSON.Array "data.#(type==\"qemu\")#|#(template==0)#") }}
<div class="color-highlight size-h3">{{ $qemu_running }}/{{ $qemu_total }}</div>
<div class="size-h5 uppercase">VM</div>
</div>
<div>
{{ $storage_available := len (.JSON.Array "data.#(type==\"storage\")#|#(status==\"available\")#") }}
{{ $storage_total := len (.JSON.Array "data.#(type==\"storage\")#") }}
<div class="color-highlight size-h3">{{ $storage_available }}/{{ $storage_total }}</div>
<div class="size-h5 uppercase">Storage</div>
</div>
</div>
</div>
Environment variables
PROXMOXVE_URL
the URL of the Proxmox VE server
PROXMOXVE_KEY
You need to generate an API token for it, follow the steps below if you don't have one
- Navigate to the Proxmox portal, click on Datacenter
- Expand Permissions, click on Groups
- Click the Create button
- Name the group something informative, like
api-ro-users("ro" for read-only) - Click on the Permissions "folder"
- Click Add -> Group Permission
- Path: /
- Group: group from bullet 4 above
- Role: PVEAuditor
- Propagate: Checked
- Expand Permissions, click on Users
- Click the Add button
- User name: something informative like
api - Realm: Linux PAM standard authentication
- Group: group from bullet 4 above
- User name: something informative like
- Expand Permissions, click on API Tokens
- Click the Add button
- User: user from bullet 8 above
- Token ID: something informative like the application or purpose like for general use
sharedor for specificglance - Privilege Separation: Checked
- Go back to the "Permissions" menu
- Click Add -> API Token Permission
- Path: /
- API Token: select the Token ID created in Step 10
- Role: PVE Auditor
- Propagate: Checked
Your key should look like <username>@pam!<tokenID>=<secret>
example:
api@pam!shared=some-random-secret-value-here
source: gethomepage's documentation