diff --git a/modules/services/grafana.nix b/modules/services/grafana.nix index 7fb178b..ca25192 100644 --- a/modules/services/grafana.nix +++ b/modules/services/grafana.nix @@ -166,6 +166,19 @@ in } ]; } + { + job_name = "host"; + static_configs = [ + { + targets = [ + "192.168.0.20:9100" + ]; + labels = { + instance = "host"; + }; + } + ]; + } { job_name = "scheibnmeister"; static_configs = [ diff --git a/modules/services/node-exporter.nix b/modules/services/node-exporter.nix new file mode 100644 index 0000000..7b18ff8 --- /dev/null +++ b/modules/services/node-exporter.nix @@ -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 + ''; + }; +} diff --git a/systems/amd-server/configuration.nix b/systems/amd-server/configuration.nix index f8ef7b0..7a6ee50 100644 --- a/systems/amd-server/configuration.nix +++ b/systems/amd-server/configuration.nix @@ -13,6 +13,7 @@ ./hardware-configuration.nix ../../modules/misc/kernel.nix ../../modules/services/ssh.nix + ../../modules/services/node-exporter.nix ]; custom = {