Am 15.03.22 um 03:31 schrieb Paul Wise:
On Mon, 2022-03-14 at 11:47 +0100, Marco d'Itri wrote:Yes, this is true. These are the unit and script that I use, and I think that Debian would benefit from having something like this available in some common package....$(systemctl status "$FAILED_UNIT" --full --lines=100)Unfortunately for my cron jobs I need the entire output of the command invocation, don't want any output from prior runs of the command and don't want any of the output to end up in the systemd journal. So I need something like StandardOutput=mail or to add some sort of wrapper script to each of the relevant systemd timers.
I might be mistaken here, but Luca hinted at$MONITOR_INVOCATION_ID in his email which means one could easily filter journal output for the last failed invocation using this $MONITOR_INVOCATION_ID.
Luca, is this understanding correct? Afaics this would cover Paul's use case Michael [1] https://lists.debian.org/debian-devel/2022/03/msg00240.html
OpenPGP_signature
Description: OpenPGP digital signature