From 6fda081dc885bfc60a80135d9e841461a4165b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sat, 24 May 2025 03:27:59 +0200 Subject: [PATCH] Add labmon to monitoring01 --- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 7 +++++++ hosts/monitoring01/configuration.nix | 24 ++++++++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/flake.lock b/flake.lock index 6174ff7..29f2630 100644 --- a/flake.lock +++ b/flake.lock @@ -42,6 +42,27 @@ "url": "https://git.t-juice.club/torjus/backup-helper" } }, + "labmon": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1748049956, + "narHash": "sha256-cRW7+dLiWZNa/socSLGCIKxExEv//wSK7ydczPKqHhk=", + "ref": "master", + "rev": "c8448885145b4e6c4822844cb63f46167c5d7efd", + "revCount": 9, + "type": "git", + "url": "https://git.t-juice.club/torjus/labmon" + }, + "original": { + "ref": "master", + "type": "git", + "url": "https://git.t-juice.club/torjus/labmon" + } + }, "nixpkgs": { "locked": { "lastModified": 1747953325, @@ -78,6 +99,7 @@ "inputs": { "alerttonotify": "alerttonotify", "backup-helper": "backup-helper", + "labmon": "labmon", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix" diff --git a/flake.nix b/flake.nix index fb45648..a5423e4 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,10 @@ url = "git+https://git.t-juice.club/torjus/alerttonotify?ref=master"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + labmon = { + url = "git+https://git.t-juice.club/torjus/labmon?ref=master"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; }; outputs = @@ -27,6 +31,7 @@ sops-nix, backup-helper, alerttonotify, + labmon, ... }@inputs: let @@ -40,6 +45,7 @@ commonOverlays = [ overlay-unstable alerttonotify.overlays.default + labmon.overlays.default ]; allSystems = [ "x86_64-linux" @@ -247,6 +253,7 @@ ./hosts/monitoring01 sops-nix.nixosModules.sops backup-helper.nixosModules.backup-helper + labmon.nixosModules.labmon ]; }; jelly01 = nixpkgs.lib.nixosSystem { diff --git a/hosts/monitoring01/configuration.nix b/hosts/monitoring01/configuration.nix index 52be653..ca22b15 100644 --- a/hosts/monitoring01/configuration.nix +++ b/hosts/monitoring01/configuration.nix @@ -69,6 +69,30 @@ ]; }; + labmon = { + enable = true; + + settings = { + ListenAddr = ":9969"; + StepMonitors = [ + { + Enabled = true; + BaseURL = "https://ca.home.2rjus.net"; + RootID = "3381bda8015a86b9a3cd1851439d1091890a79005e0f1f7c4301fe4bccc29d80"; + } + ]; + + TLSConnectionMonitors = [ + { + Enabled = true; + Address = "ca.home.2rjus.net:443"; + Verify = true; + Duration = "1h"; + } + ]; + }; + }; + # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];