From af127f70bf856e57b0f48a00273e79fce235787a Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 15 May 2022 00:34:45 +0200 Subject: [PATCH] modules/monitoring: init and add to server group --- modules/default.nix | 2 ++ modules/monitoring/default.nix | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/monitoring/default.nix diff --git a/modules/default.nix b/modules/default.nix index dcfb44a..930da19 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -11,6 +11,7 @@ let hyprspace = import ./hyprspace; ipfs = import ./ipfs; maintenance = import ./maintenance; + monitoring = import ./monitoring; nix-builder = import ./nix-builder; nix-config = import ./nix-config; nix-config-server = import ./nix-config/server.nix; @@ -38,6 +39,7 @@ in rec { server = [ deploy-rs-receiver fail2ban + monitoring nix-config-server system-recovery ] ++ base ++ networking; diff --git a/modules/monitoring/default.nix b/modules/monitoring/default.nix new file mode 100644 index 0000000..34a0c45 --- /dev/null +++ b/modules/monitoring/default.nix @@ -0,0 +1,18 @@ +{ config, hosts, ... }: +let + myNode = hosts.${config.networking.hostName}; +in +{ + services.prometheus.exporters = { + node = { + enable = true; + listenAddress = myNode.hypr.addr; + }; + + jitsi = { + enable = config.services.jitsi-meet.enable; + listenAddress = myNode.hypr.addr; + interval = "60s"; + }; + }; +}