<div dir="ltr"><div>This may not be correct but have you tried to override the systemd-coredump@.service to add an ExecStartPost=your_script_here ?</div><div><br></div><div>If I understand correctly, the socket activates the service which is the one to do the dumping itself, so maybe that or a PRE would work for you?</div><div><br></div><div>Hope it helps, as seems like the simplest way of doing it :D</div><div><br></div><div>Cheers,</div><div>Itxaka <br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, May 9, 2025 at 11:31 AM Johannes Barthel <<a href="mailto:johannes.barthel@farming-revolution.com">johannes.barthel@farming-revolution.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
we're using an Ubuntu setup where systemd-coredump is set up as the coredump handler. This is fine, coredumps end up in /var/lib/systemd/coredump/. We would however like to additionally run our own event handler (for remote error reporting) in case of a process dumping core.<br>
<br>
Does systemd-coredump provide any facilities for registering an event handler for this? Or should we create our own handler, register that as kernel.core_pattern in sysctl and forward the coredumps to systemd-coredump? I considered subscribing to the journal and filtering the coredump event out there, but that might cause unnecessary CPU load and also the API seems to be kind of broken, I ran into this issue [1].<br>
<br>
What is the best way of running our custom error reporting script in addition to systemd-coredump's default behavior?<br>
<br>
Best regards<br>
Johannes<br>
<br>
[1] <a href="https://github.com/systemd/python-systemd/issues/98" rel="noreferrer" target="_blank">https://github.com/systemd/python-systemd/issues/98</a></blockquote></div>