feat(monitoring): support cgroup exporting of metrics #183

Merged
thubrecht merged 1 commit from cgroup-exporting into main 2024-12-11 11:13:14 +01:00
2 changed files with 27 additions and 1 deletions
Showing only changes of commit e0cf11276d - Show all commits

View file

@ -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 ];

View file

@ -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": {