Pbs Exporter
A prometheus exporter for Proxmox Backup Server
Install / Use
npx skills add natrontech/pbs-exporterInstalls into whichever agent you are using.
README
Proxmox Backup Server Exporter
Export Proxmox Backup Server statistics to Prometheus.
Metrics are retrieved using the Proxmox Backup Server API.
Exported Metrics
| Metric | Meaning | Labels |
| ------------------------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| pbs_up | Was the last query of Proxmox Backup Server successful? | |
| pbs_version | Version of Proxmox Backup Server | version, repoid, release |
| pbs_available | The available bytes of the underlying storage. | datastore |
| pbs_size | The size of the underlying storage in bytes. | datastore |
| pbs_used | The used bytes of the underlying storage. | datastore |
| pbs_snapshot_count | The total number of backups. | datastore, namespace |
| pbs_snapshot_vm_count | The total number of backups per VM. | datastore, namespace, vm_id, vm_name |
| pbs_snapshot_vm_last_timestamp | The timestamp of the last backup of a VM. | datastore, namespace, vm_id, vm_name |
| pbs_snapshot_vm_last_verify | The verify status of the last backup of a VM. | datastore, namespace, vm_id, vm_name |
| pbs_host_subscription_due_timestamp_seconds | The subscription due timestamp of the host in seconds. | productname |
| pbs_host_subscription_info | The subscription info of the host. | productname, status |
| pbs_host_subscription_status | Indicates if the subscription is in the state indicated by the label. | status = (active|expired|invalid|new|notfound|superseded) |
| pbs_host_cpu_usage | The CPU usage of the host. | |
| pbs_host_memory_free | The free memory of the host. | |
| pbs_host_memory_total | The total memory of the host. | |
| pbs_host_memory_used | The used memory of the host. | |
| pbs_host_swap_free | The free swap of the host. | |
| pbs_host_swap_total | The total swap of the host. | |
| pbs_host_swap_used | The used swap of the host. | |
| pbs_host_disk_available | The available disk of the local root disk in bytes. | |
| pbs_host_disk_total | The total disk of the local root disk in bytes. | |
| pbs_host_disk_used | The used disk of the local root disk in bytes. | |
| pbs_host_uptime | The uptime of the host. | |
| pbs_host_io_wait | The io wait of the host. | |
| pbs_host_load1 | The load for 1 minute of the host. | |
| pbs_host_load5 | The load for 5 minutes of the host. | |
| pbs_host_load15 | The load 15 minutes of the host. | |
Flags / Environment Variables
$ ./pbs-exporter -help
You can use the following flags to configure the exporter. All flags can also be set using environment variables. Environment variables take precedence over flags.
| Flag | Environment Variable | Description | Default |
| -------------------- | -------------------- | ---------------------------------------------------- | ------------------------------------------------------ |
| pbs.loglevel | PBS_LOGLEVEL | Log level (debug, info) | info |
| pbs.api.token | PBS_API_TOKEN | API token to use for authentication | |
| pbs.api.token.name | PBS_API_TOKEN_NAME | Name of the API token to use for authentication | pbs-exporter |
| pbs.endpoint | PBS_ENDPOINT | Address of the Proxmox Backup Server | http://localhost:8007 (if no parameter target set) |
| pbs.username | PBS_USERNAME | Username to use for authentication | root@pam |
| pbs.timeout | PBS_TIMEOUT | Timeout for requests to Proxmox Backup Server | 5s |
| pbs.insecure | PBS_INSECURE | Disable TLS certificate verification | false |
| pbs.metrics-path | PBS_METRICS_PATH | Path under which to expose metrics | /metrics |
| pbs.listen-address | PBS_LISTEN_ADDRESS | Address to listen on for web interface and telemetry | :10019 |
Running on PBS (systemd)
The Prometheus-pbs-exporter can also simply be installed on a Proxmox Backup Server instead of spawning an additional Docker container.
# Download prometheus-pbs-exporter
mkdir /opt/pbs-exporter
cd /opt/pbs-exporter
wget https://github.com/natrontech/pbs-exporter/releases/download/v0.6.4/pbs-exporter_v0.6.4_linux_amd64.tar.gz
tar xfvz pbs-exporter_v0.6.4_linux_amd64.tar.gz
cp pbs-exporter-linux-amd64 /bin/
# Create a dedicated user for running the prometheus-pbs-exporter
useradd -m pbs-exporter -s /sbin/nologin
# Download systemd unit file
cd /etc/systemd/system
wget https://raw.githubusercontent.com/natrontech/pbs-exporter/refs/heads/main/systemd/prometheus-pbs-exporter.service
systemd daemon-reload
# Create prometheus-pbs-exporter environment file (req. minimum the token)
vi /etc/pbs-exporter.env
# Add the token content and other options if required:
TOKEN=beef-1337-cafe-beef-cafe-1337
# Enable and start the service
systemctl enable prometheus-pbs-exporter.service
systemctl start prometheus-pbs-exporter.service
D
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
