diff --git a/machines/storage01/garage.nix b/machines/storage01/garage.nix index dd3b6b9..3a7b5c5 100644 --- a/machines/storage01/garage.nix +++ b/machines/storage01/garage.nix @@ -50,7 +50,7 @@ in k2v_api.api_bind_addr = "[::]:3904"; - admin.api_bind_addr = "0.0.0.0:3903"; + admin.api_bind_addr = "127.0.0.1:3903"; }; environmentFile = config.age.secrets."garage-environment_file".path; diff --git a/machines/storage01/prometheus.nix b/machines/storage01/prometheus.nix index ad5a1cf..168e9a5 100644 --- a/machines/storage01/prometheus.nix +++ b/machines/storage01/prometheus.nix @@ -69,6 +69,11 @@ in metrics_path = "/ups_metrics"; static_configs = [ { targets = [ "100.80.255.180:9199" ]; } ]; } + { + job_name = "garage"; + static_configs = [ { targets = [ "localhost:3903" ]; } ]; + bearer_token_file = config.age.secrets."prometheus-garage_api".path; + } ]; }; diff --git a/machines/storage01/secrets/garage-environment_file b/machines/storage01/secrets/garage-environment_file index ae6a9db..dce047c 100644 Binary files a/machines/storage01/secrets/garage-environment_file and b/machines/storage01/secrets/garage-environment_file differ diff --git a/machines/storage01/secrets/prometheus-garage_api b/machines/storage01/secrets/prometheus-garage_api new file mode 100644 index 0000000..5c23b18 Binary files /dev/null and b/machines/storage01/secrets/prometheus-garage_api differ diff --git a/machines/storage01/secrets/secrets.nix b/machines/storage01/secrets/secrets.nix index 852b7ec..ef4d5e5 100644 --- a/machines/storage01/secrets/secrets.nix +++ b/machines/storage01/secrets/secrets.nix @@ -17,5 +17,6 @@ lib.setDefault { inherit publicKeys; } [ "peertube-service_environment_file" "peertube-smtp_password_file" "prometheus-web_config_file" + "prometheus-garage_api" "prometheus-uptime-kuma-apikey" ]