shared: add node-exporter config
This commit is contained in:
parent
a1d243881b
commit
514eca685c
1 changed files with 18 additions and 0 deletions
18
hosts/shared/node-exporter.nix
Normal file
18
hosts/shared/node-exporter.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
services = {
|
||||||
|
caddy = {
|
||||||
|
virtualHosts."${config.networking.hostName}.labs.adtya.xyz" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy /metrics 127.0.0.1:9100
|
||||||
|
tls /persist/secrets/caddy/certs/default.crt /persist/secrets/caddy/certs/default.key
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
prometheus.exporters.node = {
|
||||||
|
enable = true;
|
||||||
|
listenAddress = "127.0.0.1";
|
||||||
|
port = 9100;
|
||||||
|
enabledCollectors = [ "systemd" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue