mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
update monit
This commit is contained in:
parent
2517affc26
commit
961a41eb5a
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
9
monit/data/conf.d/service.cfg
Normal file
9
monit/data/conf.d/service.cfg
Normal 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
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user