forked from the-distro/infra
23 lines
466 B
Nix
23 lines
466 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.bagel.monitoring.exporters.cadvisor;
|
|
inherit (lib) mkEnableOption mkIf;
|
|
in
|
|
{
|
|
options.bagel.monitoring.exporters.cadvisor.enable = (mkEnableOption "Standard cAdvisor") // { default = !config.boot.isContainer; };
|
|
|
|
config = mkIf cfg.enable {
|
|
services.cadvisor = {
|
|
enable = true;
|
|
port = 9102;
|
|
listenAddress = "0.0.0.0";
|
|
};
|
|
|
|
bagel.meta.monitoring.exporters = [ { port = 9102; } ];
|
|
};
|
|
}
|