From 4647f59e3a974af8a0674052a5d4637e211e8b1d Mon Sep 17 00:00:00 2001 From: xinyangli Date: Sat, 21 Dec 2024 23:18:27 +0800 Subject: [PATCH] monitoring: monitor comin status --- machines/thorite/monitoring.nix | 16 +++++++++++++++- overlays/my-lib/settings.nix | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/machines/thorite/monitoring.nix b/machines/thorite/monitoring.nix index 981fd14..bb690d1 100644 --- a/machines/thorite/monitoring.nix +++ b/machines/thorite/monitoring.nix @@ -12,6 +12,7 @@ let hedgedocDomain grafanaUrl ntfyUrl + internalDomain ; removeHttps = s: lib.removePrefix "https://" s; in @@ -81,7 +82,20 @@ in ]; passwordFile = config.sops.secrets."prometheus/metrics_password".path; in - (mkScrapes [ + [ + { + job_name = "comin"; + scheme = "http"; + targets = map (host: "${host}.${internalDomain}:4243") [ + "weilite" + "thorite" + "la-00" + "hk-00" + "fra-00" + ]; + } + ] + ++ (mkScrapes [ { name = "immich"; scheme = "http"; diff --git a/overlays/my-lib/settings.nix b/overlays/my-lib/settings.nix index 46bdb04..be97568 100644 --- a/overlays/my-lib/settings.nix +++ b/overlays/my-lib/settings.nix @@ -16,5 +16,7 @@ prometheusCollectors = [ "thorite.coho-tet.ts.net" ]; + + internalDomain = "coho-tet.ts.net"; }; }