archive: push restic backup and prune metrics, and add a backups dashboard
This commit is contained in:
parent
9ac6024a67
commit
723ce866f1
1 changed files with 1288 additions and 4 deletions
27
nix/script-tests/otlp-gauges.nix
Normal file
27
nix/script-tests/otlp-gauges.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# `checks.script-test-otlp-gauges` — runs ../host-modules/lib/otlp-gauges.nix's
|
||||
# `otlp_gauges` against a stub `curl`, with an endpoint and without. The cases
|
||||
# are in ./otlp-gauges.sh.
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
render =
|
||||
endpoint:
|
||||
pkgs.writeText "otlp-gauges.sh" (
|
||||
import ../host-modules/lib/otlp-gauges.nix { inherit (pkgs) lib; } { inherit endpoint; }
|
||||
);
|
||||
in
|
||||
pkgs.runCommand "hyperhive-script-test-otlp-gauges"
|
||||
{
|
||||
nativeBuildInputs = [
|
||||
pkgs.coreutils
|
||||
pkgs.jq
|
||||
];
|
||||
FUNCTIONS = render "http://10.42.0.1:4318";
|
||||
FUNCTIONS_NO_ENDPOINT = render null;
|
||||
}
|
||||
''
|
||||
${pkgs.bash}/bin/bash ${./otlp-gauges.sh}
|
||||
touch "$out"
|
||||
''
|
||||
Loading…
Reference in a new issue