26 lines
502 B
Nix
26 lines
502 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.bagel.monitoring.exporters.node;
|
|
inherit (lib) mkEnableOption mkIf;
|
|
in
|
|
{
|
|
options.bagel.monitoring.exporters.node.enable = (mkEnableOption "Standard node_exporter") // { default = true; };
|
|
|
|
config = mkIf cfg.enable {
|
|
services.prometheus.exporters.node = {
|
|
enable = true;
|
|
enabledCollectors = [
|
|
"processes"
|
|
"systemd"
|
|
];
|
|
port = 9101;
|
|
};
|
|
|
|
bagel.meta.monitoring.exporters = [ { port = 9101; } ];
|
|
};
|
|
}
|