2023-11-07 23:47:14 +00:00
|
|
|
{config, ...}: {
|
|
|
|
imports = [];
|
2023-10-27 14:01:07 +00:00
|
|
|
services.prometheus.exporters.node = {
|
|
|
|
enable = true;
|
|
|
|
port = 9100;
|
2023-11-07 23:47:14 +00:00
|
|
|
# Aligned with https://git.rwth-aachen.de/fsdmath/server/prometheus/-/blob/main/node_exporter/etc/default/prometheus-node-exporter
|
|
|
|
# It was compiled along the following steps:
|
|
|
|
# 1. Does the current Debian release supports the collector?
|
|
|
|
# 2. Is the collector depracated in the latest release?
|
|
|
|
# 3. Could you probably use the collected metrics for monitoring or are they useless because they make no sense in our context
|
|
|
|
# (e.g. power adapter inside a VM, use fibre port connection)?
|
2023-10-27 14:01:07 +00:00
|
|
|
disabledCollectors = [
|
|
|
|
"arp"
|
|
|
|
"bcache"
|
|
|
|
"btrfs"
|
|
|
|
"dmi"
|
|
|
|
"fibrechannel"
|
|
|
|
"infiniband"
|
|
|
|
"nvme"
|
|
|
|
"powersupplyclass"
|
|
|
|
"rapl"
|
|
|
|
"selinux"
|
|
|
|
"tapestats"
|
|
|
|
"thermal_zone"
|
|
|
|
"udp_queues"
|
|
|
|
"xfs"
|
|
|
|
"zfs"
|
|
|
|
];
|
|
|
|
enabledCollectors = [
|
|
|
|
"buddyinfo"
|
|
|
|
"ksmd"
|
|
|
|
"logind"
|
|
|
|
"mountstats"
|
|
|
|
"processes"
|
|
|
|
];
|
|
|
|
};
|
2023-11-07 23:47:14 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [9100];
|
|
|
|
environment.persistence.${config.impermanence.name}.directories = ["/var/lib/${config.services.prometheus.stateDir}"];
|
2023-10-27 14:01:07 +00:00
|
|
|
}
|