diff --git a/modules/nixos/dgn-node-monitoring.nix b/modules/nixos/dgn-node-monitoring.nix index a241f05..6540d80 100644 --- a/modules/nixos/dgn-node-monitoring.nix +++ b/modules/nixos/dgn-node-monitoring.nix @@ -1,4 +1,10 @@ -{ config, lib, ... }: +{ + pkgs, + sources, + config, + lib, + ... +}: let inherit (lib) mkEnableOption @@ -24,6 +30,10 @@ in }; }; + imports = [ + "${sources.cgroup-exporter}/nix/module.nix" + ]; + config = mkIf cfg.enable { services.prometheus = { exporters = { @@ -36,6 +46,10 @@ in inherit (cfg) port; listenAddress = "0.0.0.0"; }; + cgroup = { + enable = true; + package = pkgs.callPackage "${sources.cgroup-exporter}/nix/package.nix" { }; + }; }; }; networking.firewall.interfaces.wt0.allowedTCPPorts = [ cfg.port ]; diff --git a/npins/sources.json b/npins/sources.json index d376076..102de78 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -38,6 +38,18 @@ "url": null, "hash": "09z5l5yh4zm0mf9hb3xc18gjk2dgv3l1icywrsxax00y1i1zlvna" }, + "cgroup-exporter": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "arianvp", + "repo": "cgroup-exporter" + }, + "branch": "main", + "revision": "816bfe1bc881ae43cf392949c47d8516a48fceeb", + "url": "https://github.com/arianvp/cgroup-exporter/archive/816bfe1bc881ae43cf392949c47d8516a48fceeb.tar.gz", + "hash": "1axg15ixja9vk78kz6mlixcd16j6h1agb52jvlwhnj56jw4ifvq8" + }, "colmena": { "type": "Git", "repository": {