mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
No description
| .vscode | ||
| alerting | ||
| assets | ||
| misc | ||
| tests | ||
| wrappers | ||
| .gitignore | ||
| config.example.json | ||
| LICENSE | ||
| prettyprint.py | ||
| README.md | ||
| requirements.txt | ||
| send_login_alert.py | ||
| send_ups_alert.py | ||
| service.py | ||
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