alert
This commit is contained in:
parent
414a60c722
commit
75b15a65d9
3 changed files with 9 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
2
monitrc
2
monitrc
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue