fix(rescue01): Filter nodes to only include real servers
This commit is contained in:
parent
a2295953da
commit
715201abc2
1 changed files with 19 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
meta,
|
||||
nodes,
|
||||
sources,
|
||||
...
|
||||
|
@ -8,6 +9,7 @@
|
|||
let
|
||||
inherit (lib)
|
||||
concatLists
|
||||
filterAttrs
|
||||
mapAttrsToList
|
||||
mkForce
|
||||
mkMerge
|
||||
|
@ -20,6 +22,8 @@ let
|
|||
probesWithTag
|
||||
;
|
||||
|
||||
serverNodes = filterAttrs (name: _: meta.nodes.${name}.nixpkgs.system == "nixos") nodes;
|
||||
|
||||
probesCfg = config.statelessUptimeKuma.probesConfig;
|
||||
|
||||
mkMonitors = name: builtins.attrNames (probesWithTag { inherit name; } probesCfg);
|
||||
|
@ -28,7 +32,8 @@ let
|
|||
|
||||
port = 3001;
|
||||
|
||||
httpExcludes = [
|
||||
httpExcludes =
|
||||
[
|
||||
"localhost"
|
||||
"ens.cal.dgnum.eu"
|
||||
"luj-current.cal.dgnum.eu"
|
||||
|
@ -37,7 +42,8 @@ let
|
|||
"saml-idp.dgnum.eu"
|
||||
"status.dgnum.eu"
|
||||
"radius.dgnum.eu"
|
||||
] ++ (concatLists (mapAttrsToList (_: { config, ... }: config.dgn-redirections.retired) nodes));
|
||||
]
|
||||
++ (concatLists (mapAttrsToList (_: { config, ... }: config.dgn-redirections.retired) serverNodes));
|
||||
|
||||
extraProbes = {
|
||||
monitors = {
|
||||
|
@ -88,7 +94,7 @@ let
|
|||
};
|
||||
|
||||
pingProbes = pingProbesFromHive {
|
||||
inherit nodes;
|
||||
nodes = serverNodes;
|
||||
mkHost = _: config: config.networking.fqdn;
|
||||
tags = [ { name = "Ping"; } ];
|
||||
excludes = [
|
||||
|
@ -99,7 +105,7 @@ let
|
|||
};
|
||||
|
||||
vpnProbes = pingProbesFromHive {
|
||||
inherit nodes;
|
||||
nodes = serverNodes;
|
||||
prefix = "VPN - ";
|
||||
mkHost = node: _: "${node}.dgnum";
|
||||
tags = [ { name = "VPN"; } ];
|
||||
|
@ -110,7 +116,7 @@ let
|
|||
};
|
||||
|
||||
httpProbes = fromHive {
|
||||
inherit nodes;
|
||||
nodes = serverNodes;
|
||||
builder =
|
||||
_: module:
|
||||
httpProbesFromConfig {
|
||||
|
|
Loading…
Reference in a new issue