Files
dotfiles/nixos/tsuba/services/monitoring.nix
uttarayan21 c959a3aea8
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
chore: Formatting
2025-08-14 19:34:20 +05:30

42 lines
790 B
Nix

{...}: {
services = {
prometheus = {
exporters = {
node = {
enable = true;
enabledCollectors = [
"systemd"
"textfile"
"filesystem"
"loadavg"
"meminfo"
"netdev"
"stat"
"time"
"uname"
"vmstat"
];
port = 9100;
};
process = {
enable = true;
settings.process_names = [
{
name = "{{.Comm}}";
cmdline = [".*"];
}
];
};
};
};
};
# Open firewall ports for Prometheus exporters
networking.firewall = {
allowedTCPPorts = [
9100 # node exporter
9256 # process exporter
];
};
}