prometheus-storagebox-exporter

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 10 Imported by: 0

README

prometheus-storagebox-exporter

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

HETZNER_TOKEN='...' ./prometheus-storagebox-exporter

then visit localhost:9509/metrics

To expose the exporter on a different addresse, you can set LISTEN_ADDRESS and set host:port.

Running as Docker container

This exporter can be run as Docker container as well.

First you need to provide your credentials in the .env file.

Then, either build and run the image manually with

docker run -d --name storagebox-exporter --env-file .env fleaz/prometheus-storagebox-exporter

or use compose:

docker compose up -d

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL