host/istal: add node_exporter to prometheus
This commit is contained in:
parent
d1f8cc2e84
commit
433966c433
2 changed files with 18 additions and 0 deletions
hosts/istal/services
|
@ -5,5 +5,6 @@
|
|||
# ./docker-registry-proxy.nix
|
||||
./nginx.nix
|
||||
./renovate.nix
|
||||
./prometheus.nix
|
||||
];
|
||||
}
|
||||
|
|
17
hosts/istal/services/prometheus.nix
Normal file
17
hosts/istal/services/prometheus.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.prometheus.exporters.node = {
|
||||
enable = true;
|
||||
port = 40000;
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/services/monitoring/prometheus/exporters.nix
|
||||
enabledCollectors = [ "systemd" ];
|
||||
# /nix/store/zgsw0yx18v10xa58psanfabmg95nl2bb-node_exporter-1.8.1/bin/node_exporter --help
|
||||
extraFlags = [ "--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi" ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
config.services.prometheus.exporters.node.port
|
||||
];
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue