add node-exporter to server
This commit is contained in:
@@ -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 = [
|
||||||
|
|||||||
17
modules/services/node-exporter.nix
Normal file
17
modules/services/node-exporter.nix
Normal 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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user