From f4fe93ae229d7b8e4b2cbf14bd27d720e42beb3e Mon Sep 17 00:00:00 2001 From: xinyangli Date: Sun, 22 Dec 2024 00:00:51 +0800 Subject: [PATCH] thorite/monitoring: alert comin build failure --- machines/thorite/monitoring.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/machines/thorite/monitoring.nix b/machines/thorite/monitoring.nix index e35fb13..afb0b6e 100644 --- a/machines/thorite/monitoring.nix +++ b/machines/thorite/monitoring.nix @@ -59,7 +59,22 @@ in node.enable = true; }; ruleModules = - (mkCaddyRules [ { host = "thorite"; } ]) + [ + { + name = "comin_rules"; + rules = [ + { + alert = "CominBuildFailed"; + expr = "comin_build_info != 1"; + for = "1m"; + labels = { + severity = "critical"; + }; + } + ]; + } + ] + ++ (mkCaddyRules [ { host = "thorite"; } ]) ++ (mkNodeRules [ { host = "thorite"; } ]) ++ (mkBlackboxRules [ { host = "thorite"; } ]); };