System monitors - Service watchdog, a simple option - feedback required

So currently you can setup a Monitor for a service and when it fails send an email or run a command.

So I can potentially configure a command to restart the service if it fails using If monitor goes down, run command but this requires that I know the command and for each of these services I want this to happen I also need to know the various commands, maybe apache2 restart or restart apache2

what are peoples thought on having an option that can be enabled in the monitor like the pfSense watchdog plugin. It a service is down, then it restarts it.

You could change the If monitor goes down, run command to have 3 options

  • do nothing
  • restart service + [max No. of retries]
  • freetype box as now called run this

Maybe there should be a limit on how many times a service can be automatically restarted in a row?

why not code your own scripts that handle the amount of retries and restarts the service if it’s below threshold and let webmin handle the email side of things ?
EDIT:
Restarting some services (which have stopped for a reason e.g mariadb killed by the OOM killer) could result in data loss/corruption only automatically restart services that you know are safe to automatically restart.

That would make sense, otherwise the system could be triggered to restart the service in question and end in a loop if there is an issue. Not sure if something like that is already integrated.

But why not using the webmin function for the report instead of an external service? Webmin already got the functions in question.

this feature “request” is not about reporting, it is more about automatically restarting services when they failure. A lot of platforms have this.

I agree that depending on your needs that some services should not be restarted, but consider apache, restarting this should have no effect if restarted.

this would not be an external service, just an option enabled in the system monitor

a good proposal

but

to do that one has to know the correct commands to use and their exact effect on other services. it would be at risk of being over writen during upgrade so have issues with consistency.

My bad, didn’t properly / fully read that part. :sweat_smile:

1 Like