Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fleaz/prometheus-storagebox-exporter
Prometheus exporter for Hetzner storage boxes
https://github.com/fleaz/prometheus-storagebox-exporter
hacktoberfest hetzner hetzner-robot-api prometheus prometheus-exporter
Last synced: about 1 month ago
JSON representation
Prometheus exporter for Hetzner storage boxes
- Host: GitHub
- URL: https://github.com/fleaz/prometheus-storagebox-exporter
- Owner: fleaz
- License: mit
- Created: 2020-01-04T21:31:32.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-04T20:11:26.000Z (9 months ago)
- Last Synced: 2024-06-21T17:07:19.089Z (6 months ago)
- Topics: hacktoberfest, hetzner, hetzner-robot-api, prometheus, prometheus-exporter
- Language: Go
- Size: 35.2 KB
- Stars: 15
- Watchers: 5
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prometheus-storagebox-exporter
This tool talks to the [Hetzner
API](https://robot.your-server.de/doc/webservice/de.html#storage-box) and
gets a list of all [Storage
Boxes](https://www.hetzner.de/storage/storage-box) in your account and exports their statistics as Prometheus metrics on port `:9509/metrics`.## Authentication
Sadly the old Hetzner API only accepts BasicAuth as an authenticaton method for their API so this exporter needs your customer number and password for your Hetzner account.
These variables gets passed to the tool as environment variables: `HETZNER_USER` and `HETZNER_PASS`## Exported Metrics
```
# HELP storagebox_disk_quota Total diskspace in MB
# TYPE storagebox_disk_quota gauge
storagebox_disk_quota{id="1234",name="Backup",product="BX10",server="u12345.your-storagebox.de"} 102400
# HELP storagebox_disk_usage Total used diskspace in MB
# TYPE storagebox_disk_usage gauge
storagebox_disk_usage{id="1234",name="Backup",product="BX10",server="u12345.your-storagebox.de"} 23256
# HELP storagebox_disk_usage_data Used diskspace by files in MB
# TYPE storagebox_disk_usage_data gauge
storagebox_disk_usage_data{id="1234",name="Backup",product="BX10",server="u12345.your-storagebox.de"} 23256
# HELP storagebox_disk_usage_snapshots Used diskspace by snapshots in MB
# TYPE storagebox_disk_usage_snapshots gauge
storagebox_disk_usage_snapshots{id="1234",name="Backup",product="BX10",server="u12345.your-storagebox.de"} 0
```# Running as docker container
This exporter can be run as docker-image as well.
Either build and run the image via the Dockerfile by running
```sh
docker build --tag storagebox-exporter .
```then modify `.env` according to your user credentials and run the image:
```
docker run -d --name storagebox-exporter storagebox-exporter --env-file .env
```or use:
## docker-compose
After modifying .env to your needs, install and run the container by running:
```
docker compose up -d # or 'docker-compose up -d' on older systems
```