feat: add node exporter
This commit is contained in:
parent
a28c2b5563
commit
3f517bbe7f
3 changed files with 21 additions and 0 deletions
|
|
@ -3,4 +3,12 @@ rec {
|
||||||
port = 3000;
|
port = 3000;
|
||||||
domain = "git.nudelerde.de";
|
domain = "git.nudelerde.de";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"metric-exporter" = {
|
||||||
|
port = 9100;
|
||||||
|
collectors = [
|
||||||
|
"systemd"
|
||||||
|
"processes"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./openssh.nix
|
./openssh.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
|
./node-exporter.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
services/node-exporter.nix
Normal file
12
services/node-exporter.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
serv = import ../config/services.nix;
|
||||||
|
in {
|
||||||
|
services.prometheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
port = serv."metric-exporter".port;
|
||||||
|
enabledCollectors = serv."metric-exporter".collectors;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ serv."metric-exporter".port ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue