This commit is contained in:
f 2020-09-12 19:42:22 -03:00
parent c06dc5a527
commit 84cf885986
2 changed files with 14 additions and 0 deletions

View file

@ -1,2 +1,10 @@
FROM sutty/monit:latest FROM sutty/monit:latest
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache knot
COPY ./monit.conf /etc/monit.d/knot.conf
EXPOSE 53
EXPOSE 53/udp
VOLUME /var/lib/knot

6
monit.conf Normal file
View file

@ -0,0 +1,6 @@
check process knot with pidfile /tmp/knot.pid
start program = "/usr/sbin/knotd -d"
stop program = "/usr/sbin/knotc stop"
if 5 restarts within 8 cycles then alert
if failed port 53 type udp protocol dns for 3 times within 5 cycles then restart
if failed port 53 type tcp protocol dns for 3 times within 5 cycles then restart