linux:monit
This is an old revision of the document!
Table of Contents
Monit
Installation
sudo apt update sudo apt install monit sudo systemctl start monit sudo systemctl enable monit sudo systemctl status monit
Monit als Dienst einrichten
/lib/systemd/system/monit.service
erstellen:
# This file is systemd template for monit service. To # register monit with systemd, place the monit.service file # to the /lib/systemd/system/ directory and then start it # using systemctl (see below). # # Enable monit to start on boot: # systemctl enable monit.service # # Start monit immediately: # systemctl start monit.service # # Stop monit: # systemctl stop monit.service # # Status: # systemctl status monit.service [Unit] Description=Pro-active monitoring utility for unix systems After=network-online.target Documentation=man:monit(1) https://mmonit.com/wiki/Monit/HowTo [Service] Type=simple KillMode=process ExecStart=/usr/local/bin/monit -I ExecStop=/usr/local/bin/monit quit ExecReload=/usr/local/bin/monit reload Restart = on-abnormal StandardOutput=null [Install] WantedBy=multi-user.target
Monit aktivieren und starten:
sudo systemctl enable monit.service sudo systemctl start monit.service
Konfiguration
/etc/monit/conf-enabled/monit.conf
erstellen:
set httpd port 2812 and use address localhost # only accept connection from localhost (drop if you use M/Monit) allow localhost # allow localhost to connect to the server and allow admin:monit # require user 'admin' with password 'monit'
linux/monit.1679532780.txt.gz · Last modified: 2024/02/17 19:03 (external edit)