Prometheus module
This commit is contained in:
parent
d5b606de09
commit
6df439251f
2 changed files with 24 additions and 2 deletions
20
modules/prometheus.nix
Normal file
20
modules/prometheus.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let cfg = config.voidcruiser.prometheus;
|
||||
in {
|
||||
options.voidcruiser.prometheus = {
|
||||
enable = mkEnableOption "Enable prometheus node";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" "cpu" ];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue