<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:lennart@poettering.net" title="Lennart Poettering <lennart@poettering.net>"> <span class="fn">Lennart Poettering</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - RFE: make it easy to plug in monitor tools that are run after completion of specific services and can process their logs (example: sendmail tool that mails service logs)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90273">bug 90273</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Summary</td>
<td>Please consider Standard{Output,Error}=<mailaddress>
</td>
<td>RFE: make it easy to plug in monitor tools that are run after completion of specific services and can process their logs (example: sendmail tool that mails service logs)
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - RFE: make it easy to plug in monitor tools that are run after completion of specific services and can process their logs (example: sendmail tool that mails service logs)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90273#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - RFE: make it easy to plug in monitor tools that are run after completion of specific services and can process their logs (example: sendmail tool that mails service logs)"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90273">bug 90273</a>
from <span class="vcard"><a class="email" href="mailto:lennart@poettering.net" title="Lennart Poettering <lennart@poettering.net>"> <span class="fn">Lennart Poettering</span></a>
</span></b>
<pre>Well, distros like Fedora default to logging cron job output, rather than
mailing, and I am very sure that's a much better approach.
I am pretty sure that systemd should not call into sendmail directly.
I think it would make sense to provide a nice way how users/admins can plug
something into services that allow sending logs via email after services
completed running. We already support "journalctl -u <unit>" as a nice way to
pull the logs out from a unit, we'd then need a good way to get this invoked
each time a service ran, with the right time parameter to only show the bits
generated since the service was started the last time.
Not sure how precisely this could look like, but I think it would be pretty
useful to have this. Downstream could then add ready-made tools to use this for
sending emails when jobs complete.
Maybe something as simply as using ExecStopPost= for this, with an env var
$LOGS_SINCE that is set to the activation time of a service could suffice.
Then, users could use ExecStopPost=/usr/bin/monitor-script <a href="mailto:foo@bar.com">foo@bar.com</a> that
implements what is need.
I am taking the liberty to change the bug title, to ask for this.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>