1
0

profiles/monitoring-server: Fetch monitoring targets from json file

This commit is contained in:
2025-06-01 13:31:43 +02:00
parent 92f8495111
commit e475e46e3c
6 changed files with 150 additions and 31 deletions

View File

@@ -10,6 +10,7 @@
./grafana.nix
./nixos-validator.nix
./prometheus.nix
./targets.nix
./uptimestatus.nix
];

View File

@@ -141,10 +141,7 @@ in {
};
static_configs = [
{
targets = [
"clerie.uber.space;infra"
"cleriewi.uber.space;infra"
];
targets = map (target: "${target};infra") config.profiles.clerie.monitoring-server.probeTargets.node-exporter-uberspace;
}
];
relabel_configs = [
@@ -225,17 +222,7 @@ in {
};
static_configs = [
{
targets = eachWithEachOther (instance: target: "${instance};${target}") blackboxMonitoringTargets [
"clerie.de"
"tagesschau.de"
"google.com"
"achtbaan.nikhef.nl"
"fluorine.net.clerie.de"
"www.fem.tu-ilmenau.de"
"www.heise.de"
"dyon.net.entr0py.de"
"matrix.fachschaften.org"
];
targets = eachWithEachOther (instance: target: "${instance};${target}") blackboxMonitoringTargets config.profiles.clerie.monitoring-server.probeTargets.blackbox-icmp6;
}
];
relabel_configs = [
@@ -267,18 +254,7 @@ in {
};
static_configs = [
{
targets = eachWithEachOther (instance: target: "${instance};${target}") blackboxMonitoringTargets [
"clerie.de"
"tagesschau.de"
"google.com"
"achtbaan.nikhef.nl"
"www.fem.tu-ilmenau.de"
"www.heise.de"
"matrix.bau-ha.us"
"dyon.net.entr0py.de"
"matrix.entr0py.de"
"matrix.fachschaften.org"
];
targets = eachWithEachOther (instance: target: "${instance};${target}") blackboxMonitoringTargets config.profiles.clerie.monitoring-server.probeTargets.blackbox-icmp4;
}
];
relabel_configs = [
@@ -310,10 +286,7 @@ in {
};
static_configs = [
{
targets = [
"matrix.entr0py.de"
"matrix.fachschaften.org"
];
targets = config.profiles.clerie.monitoring-server.probeTargets.blackbox-local-synapse;
}
];
relabel_configs = [

View File

@@ -0,0 +1,7 @@
{ ... }:
{
profiles.clerie.monitoring-server.targets = builtins.fromJSON (builtins.readFile ../../monitoring/targets.json);
}