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.
This commit is contained in:
parent
839dbd642a
commit
bef9d401a4
1 changed files with 311 additions and 0 deletions
21
nix/script-tests/database-size-push.nix
Normal file
21
nix/script-tests/database-size-push.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# `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"
|
||||
''
|
||||
Loading…
Reference in a new issue