[OpenWrt-Devel] Ubus based service watchdog?

Petr Štetiar ynezz at true.cz
Fri May 15 02:58:07 EDT 2020

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


> 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 at lists.openwrt.org

More information about the openwrt-devel mailing list