No known key found for this signature in database
GPG Key ID: B4C3BF012D9B26BE
4 changed files with
65 additions and
10 deletions
-
machines/manager/default.nix
-
machines/manager/docs.nix
-
machines/manager/monitoring.nix
-
shared/default.nix
|
@ -22,6 +22,7 @@ with lib; |
|
|
./mpi.nix |
|
|
./mpi.nix |
|
|
./slurm.nix |
|
|
./slurm.nix |
|
|
./docs.nix |
|
|
./docs.nix |
|
|
|
|
|
./monitoring.nix |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
deployment = { |
|
|
deployment = { |
|
|
|
@ -7,9 +7,7 @@ with lib; |
|
|
../../docs/module.nix |
|
|
../../docs/module.nix |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
services.nginx = { |
|
|
|
|
|
virtualHosts = { |
|
|
|
|
|
"${config.networking.domain}" = { |
|
|
|
|
|
|
|
|
services.nginx.virtualHosts."${config.networking.domain}" = { |
|
|
default = true; |
|
|
default = true; |
|
|
|
|
|
|
|
|
serverAliases = [ |
|
|
serverAliases = [ |
|
@ -18,6 +16,4 @@ with lib; |
|
|
|
|
|
|
|
|
locations."/".root = config.system.build.docs; |
|
|
locations."/".root = config.system.build.docs; |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
} |
|
@ -0,0 +1,53 @@ |
|
|
|
|
|
{ pkgs, lib, config, nodes, ... }: |
|
|
|
|
|
|
|
|
|
|
|
with lib; |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
services.grafana = { |
|
|
|
|
|
enable = true; |
|
|
|
|
|
|
|
|
|
|
|
settings.server = { |
|
|
|
|
|
addr = "127.0.0.1"; |
|
|
|
|
|
inherit (config.networking) domain; |
|
|
|
|
|
root_url = "%(protocol)s://%(domain)s:%(http_port)s/grafana/"; |
|
|
|
|
|
serve_from_sub_path = true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
# provision = { |
|
|
|
|
|
# enable = true; |
|
|
|
|
|
|
|
|
|
|
|
# datasources.path = ./grafana/datasources.yaml |
|
|
|
|
|
# }; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
services.prometheus = { |
|
|
|
|
|
enable = true; |
|
|
|
|
|
|
|
|
|
|
|
webExternalUrl = "http://${config.networking.domain}/prometheus"; |
|
|
|
|
|
|
|
|
|
|
|
scrapeConfigs = mapAttrsToList |
|
|
|
|
|
(name: node: { |
|
|
|
|
|
job_name = name; |
|
|
|
|
|
static_configs = [ |
|
|
|
|
|
{ |
|
|
|
|
|
targets = [ |
|
|
|
|
|
"${name}:${toString node.config.services.prometheus.exporters.node.port}" |
|
|
|
|
|
]; |
|
|
|
|
|
} |
|
|
|
|
|
]; |
|
|
|
|
|
}) |
|
|
|
|
|
nodes; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
services.nginx.virtualHosts.${config.networking.domain} = { |
|
|
|
|
|
locations."/grafana" = { |
|
|
|
|
|
proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}"; |
|
|
|
|
|
proxyWebsockets = true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
locations."/prometheus" = { |
|
|
|
|
|
proxyPass = "http://127.0.0.1:${toString config.services.prometheus.port}"; |
|
|
|
|
|
proxyWebsockets = true; |
|
|
|
|
|
}; |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
@ -53,5 +53,10 @@ |
|
|
|
|
|
|
|
|
services.haveged.enable = true; |
|
|
services.haveged.enable = true; |
|
|
|
|
|
|
|
|
|
|
|
services.prometheus.exporters = { |
|
|
|
|
|
node.enable = true; |
|
|
|
|
|
ipmi.enable = true; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
system.stateVersion = "22.11"; |
|
|
system.stateVersion = "22.11"; |
|
|
} |
|
|
} |