summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-05-28 18:53:06 +0200
committerRory& <root@rory.gay>2026-05-28 18:53:06 +0200
commit48044353ce2c610884ebecddae942bba2167f074 (patch)
tree9da1f0399a49a9b150a45b9f4f29c3a5a9761874
parentUpdate synapse patches (diff)
downloadRory-Open-Architecture-48044353ce2c610884ebecddae942bba2167f074.tar.xz
Spacebar prometheus
-rwxr-xr-xhost/Rory-ovh/configuration.nix1
-rw-r--r--host/Rory-ovh/spacebar-monitoring.nix40
2 files changed, 41 insertions, 0 deletions
diff --git a/host/Rory-ovh/configuration.nix b/host/Rory-ovh/configuration.nix

index 5f87db3..4acf6ce 100755 --- a/host/Rory-ovh/configuration.nix +++ b/host/Rory-ovh/configuration.nix
@@ -17,6 +17,7 @@ ../../modules/users/Alice.nix ./services/prometheus.nix + ./spacebar-monitoring.nix ./services/nginx/nginx.nix ./services/nix-bincache.nix diff --git a/host/Rory-ovh/spacebar-monitoring.nix b/host/Rory-ovh/spacebar-monitoring.nix new file mode 100644
index 0000000..52c0d33 --- /dev/null +++ b/host/Rory-ovh/spacebar-monitoring.nix
@@ -0,0 +1,40 @@ +{ config, lib, ... }: +{ + services.prometheus.scrapeConfigs = [ + { + job_name = "spacebar-api-3001"; + scrape_interval = "1s"; + static_configs = [ + { targets = [ "192.168.100.22:3001" ]; } + ]; + } + { + job_name = "spacebar-gateway-3002"; + scrape_interval = "1s"; + static_configs = [ + { targets = [ "192.168.100.22:3002" ]; } + ]; + } + { + job_name = "spacebar-cdn-3003"; + scrape_interval = "1s"; + static_configs = [ + { targets = [ "192.168.100.22:3003" ]; } + ]; + } + { + job_name = "spacebar-webrtc-3005"; + scrape_interval = "1s"; + static_configs = [ + { targets = [ "192.168.100.22:3005" ]; } + ]; + } + ] + ++ (lib.map (port: { + job_name = "spacebar-gateway-${builtins.toString port}"; + scrape_interval = "1s"; + static_configs = [ + { targets = [ "192.168.100.22:${builtins.toString port}" ]; } + ]; + }) (lib.range lib.range 3100 3115)); +}