You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tool talks to the Hetzner API and
gets a list of all Storage Boxes in your account and exports their
statistics as Prometheus metrics on <host>:9509/metrics.
Authentication
In the Cloud Console, switch to the project where your storage box is part of and generate a read-only API Token.
See the Authentication chapter in the hetzner api docs.
This token then needs to be provided as an environment variable.
Exported Metrics
# HELP storagebox_disk_quota Total diskspace in Bytes
# TYPE storagebox_disk_quota gauge
storagebox_disk_quota{id="13374223",name="Bart",product="BX21",server="u123456.your-storagebox.de"} 5.49755813888e+12
# HELP storagebox_disk_usage Total used diskspace in Bytes
# TYPE storagebox_disk_usage gauge
storagebox_disk_usage{id="13374223",name="Bart",product="BX21",server="u123456.your-storagebox.de"} 4.21402771456e+11
# HELP storagebox_disk_usage_data Used diskspace by files in Bytes
# TYPE storagebox_disk_usage_data gauge
storagebox_disk_usage_data{id="13374223",name="Bart",product="BX21",server="u123456.your-storagebox.de"} 4.21271699456e+11
# HELP storagebox_disk_usage_snapshots Used diskspace by snapshots in Bytes
# TYPE storagebox_disk_usage_snapshots gauge
storagebox_disk_usage_snapshots{id="13374223",name="Bart",product="BX21",server="u123456.your-storagebox.de"} 1.31072e+08
Usage
You need to provide your api token via environment variables. So after compiling the binary you could run it like