diff options
Diffstat (limited to 'modules/foundation/monitoring.nix')
| -rw-r--r-- | modules/foundation/monitoring.nix | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/modules/foundation/monitoring.nix b/modules/foundation/monitoring.nix index 4f06561..b8af232 100644 --- a/modules/foundation/monitoring.nix +++ b/modules/foundation/monitoring.nix @@ -7,6 +7,7 @@ let victoriaDefaultPort = 8428; nodeExporterPort = 9001; + cadvisorExporterPort = 9002; dockerExporterPort = 9323; in { @@ -62,17 +63,32 @@ in labels = { instance = name; }; }); } + { + job_name = "cadvisor"; + static_configs = everyHost ({ name, ip }: { + targets = [ "${ip}:${toString cadvisorExporterPort}" ]; + labels = { instance = name; }; + }); + } ]; }; }; }) (lib.mkIf (cfg.client.enable || cfg.server.enable) { - services.prometheus.exporters.node = { - enable = true; - openFirewall = false; - listenAddress = me.tailscale.ip; - port = nodeExporterPort; + services = { + prometheus.exporters.node = { + enable = true; + openFirewall = false; + listenAddress = me.tailscale.ip; + port = nodeExporterPort; + }; + + cadvisor = { + enable = true; + port = cadvisorExporterPort; + listenAddress = me.tailscale.ip; + }; }; }) ]; |
