aboutsummaryrefslogtreecommitdiff
path: root/nixos/hosts/tente
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-12-14 22:44:31 +0100
committerMartin Fischer <martin@push-f.com>2025-12-15 08:02:57 +0100
commitcb9b0bebfae7aa2ba65217f549f3c76e11413bd9 (patch)
tree999f19b39ae4b0390bda4bd20f05e45b028b2e8f /nixos/hosts/tente
parentde4843c5002f3f58f8bc69dd57d368324b67f4ce (diff)
feat(tente): add prometheus-storagebox-exporter
Diffstat (limited to 'nixos/hosts/tente')
-rw-r--r--nixos/hosts/tente/default.nix1
-rw-r--r--nixos/hosts/tente/exporters.nix19
-rw-r--r--nixos/hosts/tente/ports.nix1
-rw-r--r--nixos/hosts/tente/secrets/hetzner-token.agebin0 -> 387 bytes
4 files changed, 20 insertions, 1 deletions
diff --git a/nixos/hosts/tente/default.nix b/nixos/hosts/tente/default.nix
index f0aa773..76bda08 100644
--- a/nixos/hosts/tente/default.nix
+++ b/nixos/hosts/tente/default.nix
@@ -128,6 +128,7 @@ in
monitoring.prometheusPort = ports.prometheus;
monitoring.prometheusNodeExporterPort = ports.prometheusNodeExporter;
exporters.sqlExporterPort = ports.prometheusSqlExporter;
+ exporters.storageboxExporterPort = ports.prometheusStorageboxExporter;
headscale.port = ports.headscale;
matrix.port = ports.matrix;
diff --git a/nixos/hosts/tente/exporters.nix b/nixos/hosts/tente/exporters.nix
index a2e799e..eb46015 100644
--- a/nixos/hosts/tente/exporters.nix
+++ b/nixos/hosts/tente/exporters.nix
@@ -9,10 +9,14 @@ in
sqlExporterPort = lib.mkOption {
type = lib.types.int;
};
+ storageboxExporterPort = lib.mkOption {
+ type = lib.types.int;
+ };
};
imports = [
<top/shared/prometheus-sql-exporter/service.nix>
+ <top/shared/prometheus-storagebox-exporter/service.nix>
];
config = {
@@ -30,6 +34,14 @@ in
};
};
+ age.secrets.hetzner-token.file = ./secrets/hetzner-token.age;
+
+ services.prometheus-storagebox-exporter = {
+ enable = true;
+ port = cfg.storageboxExporterPort;
+ hetznerTokenFile = config.age.secrets.hetzner-token.path;
+ };
+
monitoring.prometheusScrapeConfigs = [
{
job_name = "sql";
@@ -37,7 +49,12 @@ in
targets = [ "localhost:${toString cfg.sqlExporterPort}" ];
}];
}
- # TODO: add exporter for storagebox
+ {
+ job_name = "storagebox";
+ static_configs = [{
+ targets = [ "localhost:${toString cfg.storageboxExporterPort}" ];
+ }];
+ }
];
};
}
diff --git a/nixos/hosts/tente/ports.nix b/nixos/hosts/tente/ports.nix
index 133d0f7..69e0dbd 100644
--- a/nixos/hosts/tente/ports.nix
+++ b/nixos/hosts/tente/ports.nix
@@ -8,6 +8,7 @@ rec {
prometheus = 9090;
prometheusNodeExporter = 9002;
prometheusSqlExporter = 9003;
+ prometheusStorageboxExporter = 9004;
webUis = {
inherit
diff --git a/nixos/hosts/tente/secrets/hetzner-token.age b/nixos/hosts/tente/secrets/hetzner-token.age
new file mode 100644
index 0000000..48c64b2
--- /dev/null
+++ b/nixos/hosts/tente/secrets/hetzner-token.age
Binary files differ