modules/stats: pick more collectd plugins when isMetal
This commit is contained in:
parent
759ca2fae3
commit
8f9004d906
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue