linux:monit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
linux:monit [2023/03/23 02:04] – admin | linux:monit [2024/02/17 19:03] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 5: | Line 5: | ||
sudo apt update | sudo apt update | ||
sudo apt install monit | sudo apt install monit | ||
- | sudo systemctl start monit | ||
- | sudo systemctl enable monit | ||
- | sudo systemctl status monit | ||
</ | </ | ||
==== Monit als Dienst einrichten ==== | ==== Monit als Dienst einrichten ==== | ||
- | ''/ | + | Unit File erstellen: |
+ | <code bash> | ||
+ | sudo nano / | ||
+ | </ | ||
+ | |||
+ | ''/ | ||
< | < | ||
# This file is systemd template for monit service. To | # This file is systemd template for monit service. To | ||
Line 39: | Line 41: | ||
Type=simple | Type=simple | ||
KillMode=process | KillMode=process | ||
- | ExecStart=/usr/local/bin/monit -I | + | ExecStart=/ |
- | ExecStop=/usr/local/bin/monit quit | + | ExecStop=/ |
- | ExecReload=/usr/local/bin/monit reload | + | ExecReload=/ |
Restart = on-abnormal | Restart = on-abnormal | ||
StandardOutput=null | StandardOutput=null | ||
Line 57: | Line 59: | ||
===== Konfiguration ===== | ===== Konfiguration ===== | ||
- | '' | + | Monit Config File bearbeiten: |
+ | <code bash> | ||
+ | sudo nano /etc/monit/monitrc | ||
+ | </ | ||
+ | |||
+ | ''/ | ||
< | < | ||
+ | # reporting to mmonit | ||
+ | set mmonit http:// | ||
+ | |||
+ | # webservice | ||
set httpd port 2812 and | set httpd port 2812 and | ||
use address localhost | use address localhost | ||
allow localhost | allow localhost | ||
allow admin: | allow admin: | ||
+ | </ | ||
+ | |||
+ | give the appropriate permissions | ||
+ | < | ||
+ | sudo chmod 600 / | ||
</ | </ | ||
Line 111: | Line 127: | ||
| | ||
| | ||
- | < | + | </code> |
linux/monit.1679533493.txt.gz · Last modified: 2024/02/17 19:03 (external edit)