Michael Jones <m...@meshplusplus.com> [2020-05-13 12:48:49]:

Hi,

> I have a critical service on my OpenWRT system that needs monitoring and
> re-starting if it's failed.

whats wrong with monit[1]? It was designed exactly for this purpose and is
much more flexible.

> I've been looking for a mechanism in procd that would allow me to request
> that my service be terminated if it did not periodically notify some
> watchdog endpoint via ubus.

So instead of proper error handling and crashing your service ASAP, you're now
going to add another ubus layer which might possibly fail as well. You know,
your service could happily ping the watchdog endpoint, yet still fail in other
parts. You want something more robust.

I would simply add ubus status method to that critical service, then check the
output in the cron shell/Lua script and kill the service if the output of the
ubus status method wouldnt match liveliness for that service.

In other words I think, that one can solve this use case with current
solutions, no need to bloat procd.

1. https://mmonit.com/monit/documentation/monit.html

-- ynezz

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

Reply via email to