mirror of
https://github.com/Death916/nixconfig.git
synced 2026-04-10 02:54:39 -07:00
homelab prometh
This commit is contained in:
parent
0930f3bda9
commit
a6ab75ccfe
3 changed files with 30 additions and 0 deletions
19
modules/nixos/homelab/monitoring.nix
Normal file
19
modules/nixos/homelab/monitoring.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
imports = [
|
||||
../../adguard.nix
|
||||
./restic.nix
|
||||
./monitoring.nix
|
||||
../../c2cscrape.nix
|
||||
# ../../containers/docker/immich.nix # Import the new Immich Docker container config
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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=.*"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue