Move monitoring info from notes to docs
This commit is contained in:
parent
773c7a45fd
commit
1272d4e7e3
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
This folder contains a bunch of general information on how to get the base of a PiFrame deployed.
|
This folder contains a bunch of general information on how to get the base of a PiFrame deployed.
|
||||||
|
|
||||||
|
Items marked ```REQUIRED``` are assumed to be setup and working. You've been warned.
|
||||||
|
|
||||||
* [Base Firmware (REQUIRED)](base.md)
|
* [Base Firmware (REQUIRED)](base.md)
|
||||||
* [Finalize Arch Setup](finalize_setup.md)
|
* [Finalize Arch Setup](finalize_setup.md)
|
||||||
* [Setup swap (REQUIRED)](swap.md)
|
* [Setup swap (REQUIRED)](swap.md)
|
||||||
|
@ -16,3 +18,4 @@ This folder contains a bunch of general information on how to get the base of a
|
||||||
* [Backups via restic](restic.md)
|
* [Backups via restic](restic.md)
|
||||||
* [Additional Networking Setup (REQUIRED)](cockpit.md)
|
* [Additional Networking Setup (REQUIRED)](cockpit.md)
|
||||||
* [Web Dashboard / Landing Page](landing_page.md)
|
* [Web Dashboard / Landing Page](landing_page.md)
|
||||||
|
* [System Monitoring (REQUIRED)](monit.md)
|
||||||
|
|
36
docs/monit.md
Normal file
36
docs/monit.md
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# System Monitoring
|
||||||
|
|
||||||
|
The below commands will setup ```monit``` to track key elements of the PiFrame hardware and software. ```monit``` is a very light weight monitoring solution and is used to ensure key parts of the system are in a reasonable state and working.
|
||||||
|
|
||||||
|
``` sh
|
||||||
|
|
||||||
|
pacman -S monit
|
||||||
|
mkdir /etc/monit.d
|
||||||
|
nano -w /etc/monitrc
|
||||||
|
include /etc/monit.d/*
|
||||||
|
set httpd port 2812 and
|
||||||
|
use address 0.0.0.0
|
||||||
|
allow admin:monit
|
||||||
|
set mailserver domain.tld port 587
|
||||||
|
username "piframe@domain.tld" password "apassword"
|
||||||
|
using tls
|
||||||
|
cat > /etc/monit.d/rootfs <<EOF
|
||||||
|
check filesystem rootfs with path /
|
||||||
|
if space usage > 80% then alert
|
||||||
|
EOF
|
||||||
|
cat > /etc/monit.d/tankfs <<EOF
|
||||||
|
check filesystem tankfs with path /tank
|
||||||
|
if space usage > 80% then alert
|
||||||
|
EOF
|
||||||
|
cat > /etc/monit.d/feh <<EOF
|
||||||
|
check process feh matching /usr/bin/feh
|
||||||
|
start program = "/usr/bin/systemctl start greetd"
|
||||||
|
stop program = "/usr/bin/systemctl stop greetd"
|
||||||
|
if does not exist then alert
|
||||||
|
if does not exist for 2 cycles then restart
|
||||||
|
EOF
|
||||||
|
systemctl enable --now monit
|
||||||
|
firewall-cmd --zone=public --permanent --add-port=2812/tcp
|
||||||
|
firewall-cmd --reload
|
||||||
|
|
||||||
|
```
|
36
notes.txt
36
notes.txt
|
@ -1,39 +1,3 @@
|
||||||
########################################
|
|
||||||
# system monitoring
|
|
||||||
########################################
|
|
||||||
|
|
||||||
pacman -S monit
|
|
||||||
mkdir /etc/monit.d
|
|
||||||
nano -w /etc/monitrc
|
|
||||||
include /etc/monit.d/*
|
|
||||||
set httpd port 2812 and
|
|
||||||
use address 0.0.0.0 # only accept connection from localhost (drop if you use M/Monit)
|
|
||||||
allow admin:monit # require user 'admin' with password 'monit'
|
|
||||||
|
|
||||||
|
|
||||||
set mailserver robomail.nusku.biz port 587
|
|
||||||
username "piframe@robomail.nusku.biz" password "r8QA6AEFaqtCdDjfvzY3gvsX"
|
|
||||||
using tls
|
|
||||||
cat > /etc/monit.d/rootfs <<EOF
|
|
||||||
check filesystem rootfs with path /
|
|
||||||
if space usage > 80% then alert
|
|
||||||
EOF
|
|
||||||
cat > /etc/monit.d/tankfs <<EOF
|
|
||||||
check filesystem tankfs with path /tank
|
|
||||||
if space usage > 80% then alert
|
|
||||||
EOF
|
|
||||||
cat > /etc/monit.d/feh <<EOF
|
|
||||||
check process feh matching /usr/bin/feh
|
|
||||||
start program = "/usr/bin/systemctl start greetd"
|
|
||||||
stop program = "/usr/bin/systemctl stop greetd"
|
|
||||||
if does not exist then alert
|
|
||||||
if does not exist for 2 cycles then restart
|
|
||||||
EOF
|
|
||||||
systemctl enable --now monit
|
|
||||||
firewall-cmd --zone=public --permanent --add-port=2812/tcp
|
|
||||||
firewall-cmd --reload
|
|
||||||
|
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# system _resource_ monitoring
|
# system _resource_ monitoring
|
||||||
########################################
|
########################################
|
||||||
|
|
Loading…
Reference in a new issue