depot/cluster/services/monitoring/default.nix

42 lines
863 B
Nix
Raw Normal View History

{ config, ... }:
2023-05-10 00:13:30 +03:00
let
nodeFor = nodeType: builtins.head config.services.monitoring.nodes.${nodeType};
meshIpFor = nodeType: config.vars.mesh.${nodeFor nodeType}.meshIp;
in
{
links = {
loki-ingest = {
protocol = "http";
2023-05-10 00:13:30 +03:00
ipv4 = meshIpFor "logging";
};
loki = {
protocol = "http";
ipv4 = meshIpFor "logging";
};
prometheus-ingest = {
protocol = "http";
ipv4 = meshIpFor "server";
};
};
services.monitoring = {
nodes = {
client = [ "checkmate" "thunderskin" "VEGAS" "prophet" ];
blackbox = [ "checkmate" "VEGAS" "prophet" ];
2023-05-10 00:13:30 +03:00
logging = [ "VEGAS" ];
server = [ "VEGAS" ];
};
nixos = {
client = ./client.nix;
blackbox = ./blackbox.nix;
2023-05-10 00:13:30 +03:00
logging = ./logging.nix;
server = [
./server.nix
./tracing.nix
];
};
};
}