homelab prometh

This commit is contained in:
death916 2026-01-15 05:32:01 -08:00
parent 0930f3bda9
commit a6ab75ccfe
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
services.prometheus.exporters.node = {
enable = true;
port = 9002;
enabledCollectors = [
"systemd"
"tcpstat"
"wifi"
"ethtool"
"softirqs"
"processes"
];
extraFlags = [
"--collector.systemd.unit-include=.*"
];
openFirewall = true;
};
}

View file

@ -9,6 +9,7 @@
imports = [
../../adguard.nix
./restic.nix
./monitoring.nix
../../c2cscrape.nix
# ../../containers/docker/immich.nix # Import the new Immich Docker container config
];

View file

@ -25,6 +25,14 @@
}
];
}
{
job_name = "homelab";
static_configs = [
{
targets = [ "100.65.36.116:9002" ];
}
];
}
];
exporters = {
node = {
@ -41,6 +49,7 @@
"tcpstat"
"wifi"
"sysctl"
"processes"
];
# You can pass extra options to the exporter using `extraFlags`, e.g.
# to configure collectors or disable those enabled by default.
@ -49,6 +58,7 @@
extraFlags = [
"--collector.ntp.protocol-version=4"
"--no-collector.mdadm"
"--collector.systemd.unit-include=.*"
];
};
};