mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 12:45:19 +00:00
1.1 KiB
1.1 KiB
lego-monitoring
DISCLAIMER: This repository does not have anything to do with the LEGO Group. "lego" is the internal name of my home server.
Prerequisites
pacman -S libolm arch-auditpip -r requirements.txt
Configuring
- Invite the bot account to the room (you have to accept the invite manually)
- Copy
config.example.jsontoconfig.json, edit as necessary - Run
alerting/login.pyonce to login into Matrix - (optional) Create an
alertinggroup and giveconfig.json's ownership and read rights to it, to allow sending alerts from less-privileged users
Setting up login alerts
- Copy
lego-login-alertto your/etc/sudoers.d - Add this to your
/etc/ssh/sshd_config:
# login alerts
ForceCommand /opt/lego-monitoring/wrappers/login_wrapper.sh
Running
prettyprint.py-- check and print all sensorsservice.py-- launch serviceassets/lego-monitoring.serviceis a systemd unit that startsservice.py
Disabling checks
Put names of checks into config's disabled_checks to disable them. See service.py for check names.