From e4422212d4e40189ee23ede2b404006039035bc8 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 17 Apr 2016 02:04:52 +0200 Subject: krebs.on-failure: send journal since start of failed plan --- krebs/3modules/on-failure.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'krebs/3modules/on-failure.nix') diff --git a/krebs/3modules/on-failure.nix b/krebs/3modules/on-failure.nix index 13d561b8d..a471a4bc2 100644 --- a/krebs/3modules/on-failure.nix +++ b/krebs/3modules/on-failure.nix @@ -84,6 +84,14 @@ ${pkgs.systemd}/bin/journalctl \ --lines=${toString plan.journalctl.lines} \ --output=${plan.journalctl.output} \ + --since="$( + ${pkgs.coreutils}/bin/date +'%F %T UTC' -ud "$( + ${pkgs.systemd}/bin/systemctl show \ + -p ExecMainStartTimestamp \ + ${shell.escape plan.name} \ + | ${pkgs.coreutils}/bin/cut -d= -f2- + )" + )" \ --unit=${shell.escape plan.name}.service } | ${shell.escape cfg.sendmail} -t ''; -- cgit v1.2.3