| FOTO | AUTO | EDV | AUDIO |

monit

Monit ist ein kleines Open-Source-Dienstprogramm für die Verwaltung und Überwachung von Unix-Systemen. Monit führt automatische Wartungsarbeiten aus und kann sinnvolle Kausalaktionen in Fehlersituationen auszuführen. So lässt sich ein zuverlässiges Null-Admin System kreieren.

Installation

apt install monit

Die Konfiguration wird in der Datei /etc/monit.conf oder in /etc/monit/monitrc durchgeführt.

Konfiguration Dienst

vim /etc/monit/monitrc

set daemon  60              # check services at 1-minute intervals
set logfile /var/log/monit.log
set idfile /var/monit/id
set statefile /var/monit/state
 
  set mailserver smtp.gmail.com port 587
    username "creutzandre@googlemail.com" password "05******"
    using tlsv12
 
  set mail-format {
      from: monit@$HOST
   subject: monit alert --  $EVENT : $SERVICE at $DATE
   message: $EVENT $SERVICE
            Monit $ACTION $SERVICE at $DATE on Host SRV: $DESCRIPTION
                 Date:        $DATE
                 Action:      $ACTION
                 Host:        SRV
                 Description: $DESCRIPTION
 
            Wir werden alle sterben
            Monit
                }
 
 set alert andre@creutz.net                      # receive all alerts
 set httpd port 2812 and
    allow root:password 

Konfiguration Monitoring

Die Monitoring-Anweisungen werden in die gleiche Datei geschrieben.