[systemd-devel] Health check for a service managed by systemd

Reindl Harald h.reindl at thelounge.net
Thu Jul 25 18:57:41 UTC 2019



Am 25.07.19 um 20:38 schrieb Debraj Manna:
> I have a service on a Ubuntu 16.04 which I use systemctl start, stop,
> restart and status to control.
> 
> One time the systemctl status returned active, but the application
> "behind" the service responded http code different from 200.
> 
> So I would like to restart the service when the http code is not 200.
> Can some one let me know is there a way to achieve the same via systemd? 

nope, just write a seperate service with a little curl magic and
"systemctl condrestart" and remember that you have to avoid premature
restarts just because of a little load peak


More information about the systemd-devel mailing list