You've already forked dockerfiles
mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-07-17 01:22:25 +02:00
update monit
This commit is contained in:
@ -5,12 +5,12 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER kev <noreply@easypi.info>
|
MAINTAINER kev <noreply@easypi.info>
|
||||||
|
|
||||||
RUN apk add -U monit \
|
RUN apk add --no-cache monit
|
||||||
&& rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
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 \
|
&& ln -sf /etc/monit/monitrc /etc/monitrc \
|
||||||
&& mkdir -p /var/lib/monit/events
|
&& mkdir -p /var/lib/monit/events
|
||||||
|
|
||||||
|
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
|
set httpd port 2812 and
|
||||||
use address 0.0.0.0
|
use address 127.0.0.1
|
||||||
allow admin:monit readonly
|
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 (1min) > 4 then alert
|
||||||
if loadavg (5min) > 2 then alert
|
if loadavg (5min) > 2 then alert
|
||||||
if memory usage > 80% then alert
|
if memory usage > 80% then alert
|
||||||
|
Reference in New Issue
Block a user