colmena initial implementation for sandbox and monitor
All checks were successful
Hello World / test (push) Successful in 4s
All checks were successful
Hello World / test (push) Successful in 4s
This commit is contained in:
parent
a90630ecb6
commit
5feb74d56d
40 changed files with 27629 additions and 141 deletions
40
machines/modules/node-exporter.nix
Normal file
40
machines/modules/node-exporter.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
# name,
|
||||
# meta,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.nodeExporter;
|
||||
in {
|
||||
options.nodeExporter = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.number;
|
||||
default = 9100;
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = [cfg.port];
|
||||
|
||||
services.prometheus.exporters.node =
|
||||
{
|
||||
enable = true;
|
||||
enabledCollectors = ["systemd"];
|
||||
port = cfg.port;
|
||||
extraFlags = ["--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi"];
|
||||
}
|
||||
// cfg.extraConfig;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue