feat(monitoring): support cgroup exporting of metrics
All checks were successful
Check meta / check_dns (pull_request) Successful in 20s
Check meta / check_meta (pull_request) Successful in 28s
Check workflows / check_workflows (pull_request) Successful in 30s
Build all the nodes / ap01 (pull_request) Successful in 1m11s
Build all the nodes / bridge01 (pull_request) Successful in 1m54s
Build all the nodes / geo01 (pull_request) Successful in 2m2s
Build all the nodes / geo02 (pull_request) Successful in 2m5s
Build all the nodes / rescue01 (pull_request) Successful in 2m28s
Build all the nodes / compute01 (pull_request) Successful in 2m50s
Build all the nodes / storage01 (pull_request) Successful in 2m15s
Run pre-commit on all files / check (pull_request) Successful in 32s
Build all the nodes / vault01 (pull_request) Successful in 1m51s
Build all the nodes / web02 (pull_request) Successful in 1m48s
Build all the nodes / web03 (pull_request) Successful in 1m43s
Build all the nodes / web01 (pull_request) Successful in 2m28s
Build all the nodes / ap01 (push) Successful in 1m28s
Build all the nodes / geo01 (push) Successful in 2m3s
Build all the nodes / bridge01 (push) Successful in 2m6s
Build all the nodes / geo02 (push) Successful in 2m13s
Build all the nodes / rescue01 (push) Successful in 2m34s
Build all the nodes / compute01 (push) Successful in 2m43s
Run pre-commit on all files / check (push) Successful in 41s
Build all the nodes / storage01 (push) Successful in 2m4s
Build all the nodes / vault01 (push) Successful in 2m9s
Build all the nodes / web02 (push) Successful in 1m58s
Build all the nodes / web03 (push) Successful in 1m56s
Build all the nodes / web01 (push) Successful in 2m48s

This needs an update in our node_exporter dashboard but nothing too
hard.

Signed-off-by: Ryan Lahfa <ryan@dgnum.eu>
This commit is contained in:
Ryan Lahfa 2024-12-10 01:55:20 +01:00 committed by thubrecht
parent 026acdecb7
commit e0cf11276d
2 changed files with 27 additions and 1 deletions

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