modules/stats: pick more collectd plugins when isMetal

This commit is contained in:
Astro 2022-09-29 16:21:26 +02:00
parent 759ca2fae3
commit 8f9004d906
3 changed files with 19 additions and 10 deletions

View File

@ -63,19 +63,20 @@ in {
server = {
enabled = true;
bootstrap_expect = 3;
};
server_join = {
retry_join = map (server:
zentralwerk.lib.config.site.net.${serverNet server}.hosts4.${server}
) (
builtins.filter (server: server != hostName)
servers
);
server_join = {
retry_join = map (server:
zentralwerk.lib.config.site.net.${serverNet server}.hosts4.${server}
) (
builtins.filter (server: server != hostName)
servers
);
};
};
client = {
enabled = true;
network_interface = "cluster";
inherit (server) server_join;
};
};
};

View File

@ -90,7 +90,6 @@ in
nomadJob =
let
stateDir = "/glusterfs/fast/microvms/${hostName}";
# only create tuntap if not yet existing
runTuntap = { id, ... }:
pkgs.writeScript "tuntap-${hostName}-${id}" ''
#!${pkgs.runtimeShell} -e

View File

@ -2,6 +2,11 @@
let
cfg = config.c3d2.hq.statistics;
isMetal =
!config.boot.isContainer &&
!(config ? microvm);
in
{
options.c3d2.hq.statistics = {
@ -35,8 +40,12 @@ in
cgroups = "";
vmem = "";
interface = "";
} // lib.optionalAttrs (!config.boot.isContainer) {
} // lib.optionalAttrs isMetal {
sensors = "";
cpufreq = "";
irq = "";
ipmi = "";
thermal = "";
} // lib.optionalAttrs config.services.nginx.enable {
nginx = ''
URL "http://localhost/nginx_status"