monit #4

Merged
stillbeben merged 19 commits from monit into main 2022-01-04 18:25:08 +00:00
Showing only changes of commit d5195f3355 - Show all commits

View file

@ -33,12 +33,6 @@ check process ${systemd_service} matching "/lib/systemd/${systemd_service}"
stop program = "/usr/bin/systemctl stop ${systemd_service}.service"
% endfor
check process sshd matching "/usr/sbin/sshd"
start program = "/bin/systemctl start sshd.service"
stop program = "/bin/systemctl stop sshd.service"
if failed port 22 for 2 cycles then restart
if 3 restarts within 5 cycles then alert
% for service,options in sorted(monit.get('services', {}).items()):
check process ${service} matching "${options['bin']}"
start program = "/bin/systemctl start ${options.get('systemd_unit', 'service')}.service"