summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-04-17 02:04:52 +0200
committertv <tv@krebsco.de>2016-04-17 02:04:52 +0200
commite4422212d4e40189ee23ede2b404006039035bc8 (patch)
tree786c310fe3c3a461497cb82b0fd8c64b16da8ec7 /krebs
parent2b0c6616b66570d5648c5ebe3fdad6642510ede9 (diff)
krebs.on-failure: send journal since start of failed plan
Diffstat (limited to 'krebs')
-rw-r--r--krebs/3modules/on-failure.nix8
1 files changed, 8 insertions, 0 deletions
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
'';