ctucx.git: nixfiles

ctucx' nixfiles

commit bb4cea28e7250df185c296a0981763f77524b3b3
parent 6168b30dce7373a4a0f5872899300bcb24d28bd4
Author: Leah (ctucx) <git@ctu.cx>
Date: Fri, 25 Nov 2022 20:39:16 +0100

machines/osterei/prometheus: move to machine `trabbi`
4 files changed, 63 insertions(+), 62 deletions(-)
M
machines/osterei/configuration.nix
|
1
-
D
machines/osterei/prometheus.nix
|
61
-------------------------------------------------------------
M
machines/trabbi/configuration.nix
|
1
+
A
machines/trabbi/prometheus.nix
|
62
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/machines/osterei/configuration.nix b/machines/osterei/configuration.nix
@@ -16,7 +16,6 @@
 
     # monitoring
     ../../configurations/linux/services/prometheus-node-exporter.nix
-    ./prometheus.nix
     ./grafana
 
     # git server (gitolite+stagit)
diff --git a/machines/osterei/prometheus.nix b/machines/osterei/prometheus.nix
@@ -1,61 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-
-  dns.zones."ctu.cx".subdomains.prometheus.CNAME = [ "${config.networking.fqdn}." ];
-
-  systemd.services.prometheus.onFailure = [ "email-notify@%i.service" ];
-
-  services = {
-    prometheus = {
-      enable        = true;
-      scrapeConfigs = [
-
-        {
-          job_name        = "prometheus";
-          scrape_interval = "20s";
-          scheme          = "https";
-          static_configs  = [{
-            targets = [
-              "prometheus.ctu.cx"
-            ];
-          }];
-        }
-
-        {
-          job_name        = "node-exporter";
-          scrape_interval = "30s";
-          scheme          = "https";
-          metrics_path    = "/node-exporter";
-          static_configs  = [{
-            targets = [
-              "osterei.ctu.cx"
-              "wanderduene.ctu.cx"
-              "desastro.ctu.cx"
-              "lollo.ctu.cx"
-              "hector.ctu.cx"
-              "stasicontainer.home.ctu.cx"
-              "luna.f2k1.de"
-              "jules.f2k1.de"
-              "taurus.f2k1.de"
-              "mastodon.zug.network"
-            ];
-          }];
-        }
-
-      ];
-    };
-
-
-    nginx = {
-      enable = true;
-      virtualHosts."prometheus.ctu.cx" = {
-        enableACME = true;
-        forceSSL   = true;
-        locations."/".proxyPass   = "http://127.0.0.1:9090/";
-      };
-    };
-
-  };
-
-}
diff --git a/machines/trabbi/configuration.nix b/machines/trabbi/configuration.nix
@@ -10,6 +10,7 @@
 
     # monitoring
     ../../configurations/linux/services/prometheus-node-exporter.nix
+    ./prometheus.nix
   ];
 
   age.secrets.restic-server-lollo.file    = ../../secrets/restic-server/lollo.age;
diff --git a/machines/trabbi/prometheus.nix b/machines/trabbi/prometheus.nix
@@ -0,0 +1,62 @@
+{ config, lib, pkgs, ... }:
+
+{
+
+  dns.zones."ctu.cx".subdomains.prometheus.CNAME = [ "${config.networking.fqdn}." ];
+
+  systemd.services.prometheus.onFailure = [ "email-notify@%i.service" ];
+
+  services = {
+    prometheus = {
+      enable        = true;
+      scrapeConfigs = [
+
+        {
+          job_name        = "prometheus";
+          scrape_interval = "20s";
+          scheme          = "https";
+          static_configs  = [{
+            targets = [
+              "prometheus.ctu.cx"
+            ];
+          }];
+        }
+
+        {
+          job_name        = "node-exporter";
+          scrape_interval = "30s";
+          scheme          = "https";
+          metrics_path    = "/node-exporter";
+          static_configs  = [{
+            targets = [
+              "trabbi.ctu.cx"
+              "osterei.ctu.cx"
+              "wanderduene.ctu.cx"
+              "desastro.ctu.cx"
+              "lollo.ctu.cx"
+              "hector.ctu.cx"
+              "stasicontainer.home.ctu.cx"
+              "luna.f2k1.de"
+              "jules.f2k1.de"
+              "taurus.f2k1.de"
+              "mastodon.zug.network"
+            ];
+          }];
+        }
+
+      ];
+    };
+
+
+    nginx = {
+      enable = true;
+      virtualHosts."prometheus.ctu.cx" = {
+        enableACME = true;
+        forceSSL   = true;
+        locations."/".proxyPass   = "http://127.0.0.1:9090/";
+      };
+    };
+
+  };
+
+}