Spacebar prometheus
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));
+}
|