Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/script-tests/database-size-push.nix
atlas bef9d401a4 matrix: report homeserver up, latency and database size through existing collectors
tuwunel 1.9.4 exports no metrics. The host collector gets an httpcheck
receiver on the gateway's /_matrix/client/versions (new
services.hyperhive.otel.httpChecks, declared by hive-matrix), and a timer in
the hive-matrix container pushes the database directory's size through the
forwarder's OTLP port, as the attic cache-size unit does. The size step
dereferences the state directory's symlink and pushes nothing for a result
under 4096 bytes.
2026-11-05 08:30:06 +01:00

21 lines
665 B
Nix

# `checks.script-test-database-size-push` — runs ../host-modules/lib/database-size-push.nix's
# script against a symlinked directory, as a `DynamicUser` unit's state directory
# is, with a stub `curl`. The cases are in ./database-size-push.sh.
{
pkgs,
...
}:
pkgs.runCommand "hyperhive-script-test-database-size-push"
{
nativeBuildInputs = [ pkgs.coreutils ];
SCRIPT_LINK = pkgs.writeText "database-size-push-link.sh" (
import ../host-modules/lib/database-size-push.nix { inherit (pkgs) lib; } {
dir = "@DIR@";
otlpPort = 8906;
}
);
}
''
${pkgs.bash}/bin/bash ${./database-size-push.sh}
touch "$out"
''