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";
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user