feat: Add initial prometheus support

This commit is contained in:
Kyle Brown 2023-12-15 11:58:31 -08:00
parent 2e72eac712
commit 6033a0ce5d
2 changed files with 43 additions and 0 deletions

View file

@ -11,6 +11,7 @@
./users.nix
./locale.nix
./smart.nix
# ./prometheus.nix
../../common/style/stylix.nix
];
#

View file

@ -0,0 +1,42 @@
{
config,
lib,
pkgs,
...
}: {
services.prometheus = {
port = 9001;
scrapeConfigs = [
{
job_name = "node";
static_configs = [
{
targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"];
}
];
}
];
exporters = {
node = {
enable = true;
enabledCollectors = [
"diskstats"
"filesystem"
"loadavg"
"meminfo"
"netdev"
"netstat"
"stat"
"time"
"vmstat"
"systemd"
"logind"
"interrupts"
"ksmd"
"zfs"
];
port = 9002;
};
};
};
}