nixos/prometheus: Log systemd-analyze for alertmanager/webhook-logger/pushgateway

This commit is contained in:
Jonathan Davies 2024-06-24 00:11:53 +01:00
parent 2d3f28ccd6
commit 7ce4fe5463
No known key found for this signature in database
2 changed files with 6 additions and 0 deletions

View File

@ -144,5 +144,9 @@ import ../make-test-python.nix ({ lib, pkgs, ... }:
logger.wait_until_succeeds(
"journalctl -o cat -u alertmanager-webhook-logger.service | grep '\"alertname\":\"InstanceDown\"'"
)
logger.log(logger.succeed("systemd-analyze security alertmanager-webhook-logger.service | grep -v ''"))
alertmanager.log(alertmanager.succeed("systemd-analyze security alertmanager.service | grep -v ''"))
'';
})

View File

@ -90,5 +90,7 @@ import ../make-test-python.nix ({ lib, pkgs, ... }:
"curl -sf 'http://127.0.0.1:9090/api/v1/query?query=absent(some_metric)' | "
+ "jq '.data.result[0].value[1]' | grep '\"1\"'"
)
pushgateway.log(pushgateway.succeed("systemd-analyze security pushgateway.service | grep -v ''"))
'';
})