mirror of
https://github.com/aykhans/my-self-host-services.git
synced 2026-07-13 20:37:40 +00:00
prometheus: add Hetzner storagebox exporter
This commit is contained in:
@@ -58,6 +58,7 @@ Edit the generated `.env` files to fill in the required fields:
|
|||||||
- `./stalwart/.env`
|
- `./stalwart/.env`
|
||||||
- `./caddy/.env`
|
- `./caddy/.env`
|
||||||
- `./crowdsec/.env`
|
- `./crowdsec/.env`
|
||||||
|
- `./prometheus/.env`
|
||||||
- `./caddy/Caddyfile.private`
|
- `./caddy/Caddyfile.private`
|
||||||
|
|
||||||
### 4. Bouncer Keys (CrowdSec)
|
### 4. Bouncer Keys (CrowdSec)
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ generate_env_files() {
|
|||||||
cp --update=none ./croc/.env.example ./croc/.env
|
cp --update=none ./croc/.env.example ./croc/.env
|
||||||
cp --update=none ./stalwart/.env.example ./stalwart/.env
|
cp --update=none ./stalwart/.env.example ./stalwart/.env
|
||||||
cp --update=none ./crowdsec/.env.example ./crowdsec/.env
|
cp --update=none ./crowdsec/.env.example ./crowdsec/.env
|
||||||
|
cp --update=none ./prometheus/.env.example ./prometheus/.env
|
||||||
cp --update=none ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
|
cp --update=none ./caddy/Caddyfile.private.example ./caddy/Caddyfile.private
|
||||||
print_success ".env files generated."
|
print_success ".env files generated."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
############# Hetzner Storage Box exporter #############
|
||||||
|
# Read-only Hetzner Cloud API token: Cloud Console -> Security -> API Tokens.
|
||||||
|
# The Storage Box must be managed via the Hetzner Cloud API.
|
||||||
|
HETZNER_TOKEN=
|
||||||
@@ -26,3 +26,8 @@ scrape_configs:
|
|||||||
scrape_interval: 30s
|
scrape_interval: 30s
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ["crowdsec_exporter:9100"]
|
- targets: ["crowdsec_exporter:9100"]
|
||||||
|
|
||||||
|
- job_name: storagebox_exporter
|
||||||
|
scrape_interval: 60s
|
||||||
|
static_configs:
|
||||||
|
- targets: ["storagebox_exporter:9509"]
|
||||||
|
|||||||
@@ -72,5 +72,24 @@ services:
|
|||||||
max-size: "100m"
|
max-size: "100m"
|
||||||
max-file: "3"
|
max-file: "3"
|
||||||
|
|
||||||
|
storagebox_exporter:
|
||||||
|
image: ghcr.io/crstian19/prometheus-storagebox-exporter:0.5
|
||||||
|
container_name: storagebox_exporter
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
|
networks:
|
||||||
|
- prometheus
|
||||||
|
environment:
|
||||||
|
HETZNER_TOKEN: "${HETZNER_TOKEN}"
|
||||||
|
LISTEN_ADDRESS: ":9509"
|
||||||
|
METRICS_PATH: "/metrics"
|
||||||
|
LOG_LEVEL: "info"
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "100m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
prometheus-data:
|
prometheus-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user