[systemd-devel] monitoring systemd unit flapping
Lennart Poettering
lennart at poettering.net
Sat Apr 29 11:50:33 UTC 2017
On Tue, 25.04.17 16:05, Jeremy Eder (jeder at redhat.com) wrote:
> Sorry, I did not explain myself clearly. systemd is doing nothing wrong.
> What I'd like to do is find an optimal way to notify our monitoring system
> (zabbix) that a service is flapping. We can probably script something.
> Just looking to see if there's a more elegant way. Looking also at
> OnFailure
>
> https://serverfault.com/questions/694818/get-notification-when-systemd-monitored-service-enters-failed-state
>
> At the same time, trying to avoid false positives in the monitoring system,
> so one failure is OK but when it hits startburstlimit, things are bad, even
> if the service doesn't immediately crash. That's the thing; it might take
> a few seconds/minutes to fail. I realize this could be considered an edge
> case...perhaps an equivalent of OnFailure could be
> OnStartBurstLimit= ?
You can already implement this with OnFailure=, all you need to do is
then check via "systemctl show -p Result" what the precise error
reason was you got called for...
Or you use ExecStop=, as suggested in that other mail.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list