GithubHelp home page GithubHelp logo

irrwitzer42 / prometheus-storagebox-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fleaz/prometheus-storagebox-exporter

0.0 0.0 0.0 36 KB

Prometheus exporter for Hetzner storage boxes dockerized

License: MIT License

Go 87.55% Dockerfile 12.45%

prometheus-storagebox-exporter's Introduction

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 port <host>: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

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

prometheus-storagebox-exporter's People

Contributors

fleaz avatar irrwitzer42 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.