fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:monit

This is an old revision of the document!


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'
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.  More information about cookies 
linux/monit.1679532780.txt.gz · Last modified: 2024/02/17 19:03 (external edit)