kijart / docker-monit

Run Monit inside docker
https://hub.docker.com/r/kijart/monit/
MIT License
7 stars 4 forks source link

Container keep restarting with "Monit daemon with PID 1 awakened" #3

Open Bessonov opened 3 years ago

Bessonov commented 3 years ago

Hey @kijart , thank you very much for this image. After some time the container begins restarting with "Monit daemon with PID 1 awakened" message. Do you know how to resolve it? ATM I use kijart/monit:1.2.0 with following configuration:

# All settings can be found on https://mmonit.com/monit/documentation/monit.html
# Check all services every n seconds
set daemon 30

# Start the web interface on localhost:2812. Also needed for the CLI to work.
# https://mmonit.com/monit/documentation/monit.html#TCP-PORT
set httpd port 2812
    allow confi:dential

# Add a custom mailserver through which monit will send alerts
# https://mmonit.com/monit/documentation/monit.html#Setting-a-mail-server-for-alert-delivery

SET MAILSERVER email.com
    PORT 587
    USERNAME very
    PASSWORD secret
    using TLSV1

# Adjust the contents and format of the mail
# https://mmonit.com/monit/documentation/monit.html#Message-format

set mail-format {
    from: important@mycompany
}

# Activate mail alerts and set mail adresses
# Mails are sent once on alert and once on recovery
# https://mmonit.com/monit/documentation/monit.html#Setting-a-mail-server-for-alert-delivery
#  SET ALERT mail-address [[NOT] {event, ...}] [REMINDER cycles]
SET ALERT boss@mycompany REMINDER 120
check system localhost
    if loadavg(5min) > 2 then alert
    if memory > 50% then alert

check filesystem localhost-sda1 with path /dev/sda1
    if SPACE usage > 30% then alert

check host sentry with address important.host
    group common
    if failed
        port 443
        protocol https
        request /auth
        status = 200
        content = "csrfmiddlewaretoken"
        certificate valid > 28 days
        timeout 10 seconds
    then alert
[....]
kijart commented 3 years ago

Hi @Bessonov I have not had time to check if the problem is specific or general, have you been able to find out more?

As reference, an old but similar issue I have found in a mailing lists

ln-12 commented 2 years ago

I got the exact same issue. I solved it by deleting the docker container and starting fresh with my configuration.