muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.28k stars 319 forks source link

Systemd's Watchdog #275

Closed rubiojr closed 4 years ago

rubiojr commented 4 years ago

Linux only.

Enable Systemd's watchdog integration when running under Systemd and and the service unit has enabled the watchdog feature.

Related: https://github.com/muesli/beehive/pull/273

muesli commented 4 years ago

Nice! We also got a sample service file in https://github.com/muesli/beehive/tree/master/admin which we should update accordingly.

rubiojr commented 4 years ago

@muesli pushed some fixes updating docs and simplifying the math. Let me know if that reads a bit better.

rubiojr commented 4 years ago

Looks something like:

Nov 10 16:32:52 dunraid beehive[38759]: DEBU[0010] Systemd watchdog notify
Nov 10 16:33:02 dunraid beehive[38759]: INFO[0020] Handling request                              Method=GET URL=/
Nov 10 16:33:02 dunraid beehive[38759]: INFO[0020] serving config/index.html ... (from )
Nov 10 16:33:02 dunraid beehive[38759]: INFO[0020] Finished request                              Duration="274.426µs" Method=GET Response=200 URL=/
Nov 10 16:33:02 dunraid beehive[38759]: DEBU[0020] Systemd watchdog notify

when the debug log is enabled.

muesli commented 4 years ago

Awesome, thank you for another great contribution! :heart: