From 027c05755ad67a89f9f45121c9a677c88bffc961 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 | 20 +++++++++++++++++++- overlays/my-lib/settings.nix | 2 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/machines/thorite/monitoring.nix b/machines/thorite/monitoring.nix index 981fd14..29be001 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,24 @@ in ]; passwordFile = config.sops.secrets."prometheus/metrics_password".path; in - (mkScrapes [ + [ + { + job_name = "comin"; + scheme = "http"; + static_config = [ + { + 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"; }; }