22 lines
443 B
Nix
22 lines
443 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.services.prometheus.exporters.systemd;
|
|
|
|
in {
|
|
port = 9558;
|
|
|
|
serviceOpts = {
|
|
serviceConfig = {
|
|
ExecStart = ''
|
|
${pkgs.prometheus-systemd-exporter}/bin/systemd_exporter \
|
|
--web.listen-address ${cfg.listenAddress}:${toString cfg.port}
|
|
'';
|
|
RestrictAddressFamilies = [
|
|
# Need AF_UNIX to collect data
|
|
"AF_UNIX"
|
|
];
|
|
};
|
|
};
|
|
}
|