diff options
author | Vincent Ambo <mail@tazj.in> | 2021-04-12T15·59+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-04-12T22·01+0000 |
commit | da5512f2e9a7d97bccbcac8b8971defa5b971b83 (patch) | |
tree | c4ef51e33a1f15af1a45d399d198f49de3a17d32 /ops/modules | |
parent | f520bd40cab9bae4f8fa26fe36365a7bf9bccd5a (diff) |
feat(whitby): Enable Grafana at status.tvl.su r/2498
Enables a Grafana service pointing to whitby's local Prometheus instance, accessible at status.tvl.su. I've no idea how to configure Grafana and if it's possible to link it to CAS, but we'll see about that later. Notes: * the explicit fixpoint for whitby config has been removed as we have the `config` parameter available now * backups are enabled for the Grafana storage location Change-Id: If5ffe0c1a3378d1c88529129487c643642705fd2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2948 Tested-by: BuildkiteCI Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'ops/modules')
-rw-r--r-- | ops/modules/www/status.tvl.su.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ops/modules/www/status.tvl.su.nix b/ops/modules/www/status.tvl.su.nix new file mode 100644 index 000000000000..2bb6093c1472 --- /dev/null +++ b/ops/modules/www/status.tvl.su.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."status-fyi" = { + serverName = "status.tvl.fyi"; + enableACME = true; + extraConfig = "return 302 https://status.tvl.su$request_uri;"; + }; + + services.nginx.virtualHosts.grafana = { + serverName = "status.tvl.su"; + enableACME = true; + forceSSL = true; + + locations."/" = { + proxyPass = "http://localhost:${toString config.services.grafana.port}"; + }; + }; + }; +} |