nixos/prometheus: fix node exporter systemd collector
The systemd collector needs AF_UNIX to talk to
/var/run/dbus/system_bus_socket, which was broken
with 9fea6d4c85
.
This commit allows AF_UNIX when needed.
This commit is contained in:
parent
b8ffa68b35
commit
ae7ce180dd
1 changed files with 2 additions and 0 deletions
|
@ -35,6 +35,8 @@ in
|
|||
${concatMapStringsSep " " (x: "--no-collector." + x) cfg.disabledCollectors} \
|
||||
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} ${concatStringsSep " " cfg.extraFlags}
|
||||
'';
|
||||
# The systemd collector needs AF_UNIX
|
||||
RestrictAddressFamilies = lib.optional (lib.any (x: x == "systemd") cfg.enabledCollectors) "AF_UNIX";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue