about summary refs log tree commit diff
path: root/users/grfn/system
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-11-07T22·01-0500
committergrfn <grfn@gws.fyi>2021-11-07T23·02+0000
commite9c3d2f6d91129d173f4f94b4fa3d8269480094c (patch)
tree9db885c95badf4db02994b6f61e0961625ce5589 /users/grfn/system
parent5327d238e3f292e8c5d9b161df1ee3b56665aa96 (diff)
feat(gs/mugwump): Run xanthous server r/3021
Add a nixos module for running the xanthous server in a docker
container, and install it on mugwump including a prometheus scrape
config.

Change-Id: Ifeb315845b7eef2ee33af98fa3f71acdd3d9fe6b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3812
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/grfn/system')
-rw-r--r--users/grfn/system/system/machines/mugwump.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/users/grfn/system/system/machines/mugwump.nix b/users/grfn/system/system/machines/mugwump.nix
index 6e6deb6c2b24..aae9b0387ff5 100644
--- a/users/grfn/system/system/machines/mugwump.nix
+++ b/users/grfn/system/system/machines/mugwump.nix
@@ -7,6 +7,7 @@ with lib;
     ../modules/common.nix
     (modulesPath + "/installer/scan/not-detected.nix")
     "${depot.path}/ops/modules/prometheus-fail2ban-exporter.nix"
+    "${depot.path}/users/grfn/xanthous/server/module.nix"
   ];
 
   networking.hostName = "mugwump";
@@ -201,6 +202,12 @@ with lib;
         targets = ["localhost:${toString config.services.prometheus.exporters.nginx.port}"];
       }];
     } {
+      job_name = "xanthous_server";
+      scrape_interval = "1s";
+      static_configs = [{
+        targets = ["localhost:${toString config.services.xanthous-server.metricsPort}"];
+      }];
+    } {
       job_name = "blackbox";
       metrics_path = "/probe";
       params.module = ["https_2xx"];
@@ -226,6 +233,8 @@ with lib;
     }];
   };
 
+  services.xanthous-server.enable = true;
+
   virtualisation.docker.enable = true;
 
   services.buildkite-agents = listToAttrs (map (n: rec {