This commit is contained in:
f 2019-09-10 21:11:06 -03:00
parent 414a60c722
commit 75b15a65d9
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
3 changed files with 9 additions and 0 deletions

View file

@ -1,6 +1,10 @@
FROM alpine:3.10 FROM alpine:3.10
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
# TODO: We don't want to receive lots of email, so we'll change this to
# a pingy instance that will also work as a status site.
ENV EMAIL monit@sutty.nl
# Install monit and remove default config # Install monit and remove default config
RUN apk add --no-cache tini monit && rm -f /etc/monitrc RUN apk add --no-cache tini monit && rm -f /etc/monitrc

View file

@ -14,5 +14,8 @@ ip route \
# Put in place # Put in place
mv /etc/monit.d/monit.conf~ /etc/monit.d/monit.conf mv /etc/monit.d/monit.conf~ /etc/monit.d/monit.conf
# Configure email
grep -q "${EMAIL}" || echo "set alert ${EMAIL}" >> /etc/monitrc
# Reload config # Reload config
monit reload monit reload

View file

@ -5,6 +5,8 @@ set pidfile /run/monit.pid
set idfile /var/lib/monit/id set idfile /var/lib/monit/id
set statefile /var/lib/monit/state set statefile /var/lib/monit/state
set eventqueue basedir /var/lib/monit/events slots 100 set eventqueue basedir /var/lib/monit/events slots 100
set mailserver postfix
set limits { programoutput: 1 MB }
check program allow_networks check program allow_networks
with path "/usr/local/bin/allow_networks" with path "/usr/local/bin/allow_networks"