Am 26.05.2016 um 14:39 schrieb Thomas Güttler:
Am 26.05.2016 um 14:35 schrieb Andrei Borzenkov:
On Thu, May 26, 2016 at 3:18 PM, Thomas Güttler
<guettl...@thomas-guettler.de> wrote:
I want to know if the service is alive,

Define "service is alive".

the service is alive if a custom check method has the exit status of 0

the you *need* to test this outside of the service itself, completly rely on a even from inside the service which signals all is fine is a broken design when it comes to monitoring - you can't ask the thing which you want to monitor if ot works as expectd "do you work as expected" - common sense

for our webservers a simple loop with a sleep checks if it responds with the expected content and if not calls "systemctl condrestart httpd" to not behave bad after a intended service stop

another method would be just send a SIGKILL to the process and use
Restart=always
RestartSec=1

would lead in systemd restarts it automatically

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to