feat: add prometheus exporter
This commit is contained in:
parent
059bac76d1
commit
6bbc743715
3 changed files with 21 additions and 0 deletions
|
|
@ -39,4 +39,12 @@ rec {
|
||||||
port = 8081;
|
port = 8081;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"metric-exporter" = {
|
||||||
|
port = 9100;
|
||||||
|
collectors = [
|
||||||
|
"systemd"
|
||||||
|
"processes"
|
||||||
|
"thermal_zone"
|
||||||
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,6 @@
|
||||||
./autossh.nix
|
./autossh.nix
|
||||||
./continuwuity.nix
|
./continuwuity.nix
|
||||||
./vikunja.nix
|
./vikunja.nix
|
||||||
|
./node-exporter.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
services/node-exporter.nix
Normal file
12
services/node-exporter.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
serv = import ../config/services.nix;
|
||||||
|
in {
|
||||||
|
services.prometheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
port = serv."metric-exporter".port;
|
||||||
|
enabledCollectors = serv."metric-exporter".collectors;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ serv."metric-exporter".port ];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue