mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
57 lines
1 KiB
Nix
57 lines
1 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf mkMerge;
|
|
in {
|
|
config = {
|
|
services.prometheus.exporters = {
|
|
node = mkMerge [
|
|
{
|
|
#enable = true;
|
|
port = 9091;
|
|
enabledCollectors = [
|
|
"nfs"
|
|
];
|
|
}
|
|
(mkIf config.services.nfs.server.enable {
|
|
enabledCollectors = [
|
|
"nfsd"
|
|
];
|
|
})
|
|
(mkIf (!config.boot.isContainer) {
|
|
enabledCollectors = [
|
|
"nvme"
|
|
"hwmon"
|
|
];
|
|
})
|
|
{
|
|
enabledCollectors = [
|
|
"arp"
|
|
"boottime"
|
|
"cpu"
|
|
"cpufreq"
|
|
"diskstats"
|
|
"dmi"
|
|
"entropy"
|
|
"filesystem"
|
|
"netdev"
|
|
"systemd"
|
|
"sysctl"
|
|
"systemd"
|
|
"loadavg"
|
|
"meminfo"
|
|
"netstat"
|
|
"os"
|
|
"stat"
|
|
"time"
|
|
"uname"
|
|
"vmstat"
|
|
"zfs"
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|