0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-20 00:50:38 +03:00
nixpkgs/nixos/modules/services/monitoring/prometheus/exporters/systemd.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
514 B
Nix
Raw Normal View History

{
config,
pkgs,
lib,
...
}:
let
cfg = config.services.prometheus.exporters.systemd;
inherit (lib) concatStringsSep;
in
{
port = 9558;
serviceOpts = {
serviceConfig = {
ExecStart = ''
${pkgs.prometheus-systemd-exporter}/bin/systemd_exporter \
--web.listen-address ${cfg.listenAddress}:${toString cfg.port} ${concatStringsSep " " cfg.extraFlags}
'';
RestrictAddressFamilies = [
# Need AF_UNIX to collect data
"AF_UNIX"
];
};
};
}