24 lines
431 B
Nix
24 lines
431 B
Nix
{ lib, config, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.voidconf.prometheus;
|
|
in
|
|
{
|
|
options.voidconf.prometheus = {
|
|
enable = mkEnableOption "Enable prometheus node";
|
|
};
|
|
config = mkIf cfg.enable {
|
|
services.prometheus = {
|
|
exporters = {
|
|
node = {
|
|
enable = true;
|
|
enabledCollectors = [
|
|
"systemd"
|
|
"cpu"
|
|
];
|
|
port = 9002;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|