feat: Add initial prometheus support
This commit is contained in:
parent
2e72eac712
commit
6033a0ce5d
2 changed files with 43 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
./users.nix
|
||||
./locale.nix
|
||||
./smart.nix
|
||||
# ./prometheus.nix
|
||||
../../common/style/stylix.nix
|
||||
];
|
||||
#
|
||||
|
|
42
common/nixos/prometheus.nix
Normal file
42
common/nixos/prometheus.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue