1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00

update monit

This commit is contained in:
kev 2017-01-12 12:26:45 +08:00
parent 2517affc26
commit 961a41eb5a
5 changed files with 27 additions and 10 deletions

View File

@ -5,12 +5,12 @@
FROM alpine
MAINTAINER kev <noreply@easypi.info>
RUN apk add -U monit \
&& rm -rf /var/cache/apk/*
RUN apk add --no-cache monit
COPY monit /etc/monit
COPY data /etc/monit
RUN chmod 600 /etc/monit/monitrc \
RUN set -xe \
&& chmod 600 /etc/monit/monitrc \
&& ln -sf /etc/monit/monitrc /etc/monitrc \
&& mkdir -p /var/lib/monit/events

View File

@ -1,4 +1,4 @@
check network eth0 with interface eth0
if upload > 500 kB/s then alert
if total download > 3 GB in last 2 hours then alert
if total download > 30 GB in last day then alert
if upload > 500 kB/s then alert
if total download > 3 GB in last 2 hours then alert
if total download > 30 GB in last day then alert

View File

@ -0,0 +1,9 @@
check host httpbin with address httpbin.org
if failed
port 443
protocol https
username "username"
password "********"
request "/get"
content = "Authorization"
then alert

View File

@ -1,3 +1,11 @@
set httpd port 2812 and
use address 0.0.0.0
allow admin:monit readonly
use address 127.0.0.1
allow admin:monit
allow guest:monit readonly
set mailserver smtp.gmail.com port 587
username "username"
password "********"
using ssl
set alert username@gmail.com

View File

@ -1,4 +1,4 @@
check system ss.easypi.info
check system monit.httpbin.org
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
if memory usage > 80% then alert