lightweight monitoring container based on the free Monit 5.28.0 on alpine (https://www.mmonit.com)
1.2K
Description: Creates a monitoring container based on Monit 5.28.0 (https://www.mmonit.com).
You can personalize the monit config by mounting another file (see below), if you do not mount one, a sample file will be used (/opt/monit/config/monit.conf.sample).
docker-compose example:
monit:
hostname: monit
container_name: monit
image: vtacquet/monit
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/docker/monit/config/monit.conf:/opt/monit/config/monit.conf:ro
ports:
- "80:80"
monit.conf example:
(change [email protected] and add a real smtp server in stead of smtp.server.com)
set daemon 60
set httpd
port 80
use address 0.0.0.0
allow 127.0.0.1/32
allow 0.0.0.0/0.0.0.0
allow admin:monit
set mailserver
smtp.server.com
port 25
set alert [email protected] { connection, link, icmp }
set mail-format {
from: [email protected]
reply-to: [email protected]
subject: monit [$SERVICE] $EVENT
message: $SERVICE: $DESCRIPTION
}
check filesystem root
with path /
if space free < 5 GB for 2 cycles then alert
check host monit
with address 127.0.0.1
group physical
if failed ping4 for 2 cycles then alert
if failed port 80 protocol http with http headers [Authorization: Basic YWRtaW46bW9uaXQ=] for 2 cycles then alert
Content type
Image
Digest
Size
16.9 MB
Last updated
over 5 years ago
docker pull vtacquet/monit