activate NixOS monitoring in prometheus
This commit is contained in:
@@ -23,6 +23,11 @@ in
|
||||
};
|
||||
bird = mkEnableOption "Monitor bird";
|
||||
blackbox = mkEnableOption "Monitor blackbox";
|
||||
nixos = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Monitor NixOS";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -95,9 +100,13 @@ in
|
||||
User = "nixos-exporter";
|
||||
Group = "nixos-exporter";
|
||||
ExecStart = ''
|
||||
${pkgs.nixos-exporter}/bin/nixos-exporter
|
||||
${pkgs.nixos-exporter}/bin/nixos-exporter --listen [::]:9152
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.extraCommands = ''
|
||||
ip46tables -A nixos-fw -i wg-monitoring -p tcp -m tcp --dport 9152 -m comment --comment nixos-exporter -j nixos-fw-accept
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user