add node-exporter to server

This commit is contained in:
Kopatz
2025-11-08 15:48:21 +01:00
parent 9010f16549
commit 4af8a52b6e
3 changed files with 31 additions and 0 deletions

View File

@@ -166,6 +166,19 @@ in
} }
]; ];
} }
{
job_name = "host";
static_configs = [
{
targets = [
"192.168.0.20:9100"
];
labels = {
instance = "host";
};
}
];
}
{ {
job_name = "scheibnmeister"; job_name = "scheibnmeister";
static_configs = [ static_configs = [

View File

@@ -0,0 +1,17 @@
{
pkgs,
config,
lib,
...
}:
let
in
{
services.prometheus.exporters.node = {
enable = true;
openFirewall = true;
firewallRules = ''
ip saddr 192.168.0.10 tcp dport 9100 counter accept comment node_exporter_allow_from_main_server
'';
};
}

View File

@@ -13,6 +13,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/misc/kernel.nix ../../modules/misc/kernel.nix
../../modules/services/ssh.nix ../../modules/services/ssh.nix
../../modules/services/node-exporter.nix
]; ];
custom = { custom = {