[solved] monit alert emails

Discussion in 'Installation/Configuration' started by inka, Jun 14, 2023.

  1. inka

    inka Member

    This is a default ispconfig / monit setup, no monit server configured.
    ispconfig is running as lxd container and i wrote a script that cycles through all my containers, stops > snapshots > restarts > create copy of snapshot > export > sort > borg.
    Now the stop is necessary or i might end up with bad db backups.
    The problem is that every time ispconfig goes down and restarts for these few seconds monit has to push these monit emails.

    Maybe some one here knows how monit works exactly and if it could be bend to send this emails if threshold of time was exceeded?
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    monit checks the service and does whatever is configured every x amount of time.
    it can alert if a service is down for y number of cycles. restart a service if it's down for y number of cycles. etc
    where x and y are configured for each check (or uses a default value instead)
    monit will only send an email if the service is down at the time it checks, ie if you have it configured to check mysql every 5 minutes, and it checks at 2:55. if mysql is stopped at 2:56, a backup taken, and mysql restarted at 2:58, then monit rechecks at 3:00, you won't get any alert email since it doesn't make any service check during the down period.
    all the configuration is in /etc/monit/ and it's subfolders.
    if you want to know more specifically how to alter the configuration, you should read the documentation and howto's...
    https://mmonit.com/monit/#documentation
     
    ahrasis and inka like this.
  3. inka

    inka Member

    That was pretty painless to config, especially with the start delay setting. This could actually work out, will see how it goes.
    Thanks again Ser.
     

Share This Page