Monitor journald in real time and get Telegram messages when patterns match. This repository provides a script and systemd service.
The script, as well as a systemd service, can be installed
with the provided Makefile
.
You may need root privileges to execute the Makefile
.
As with everything coming from the internet, please review the files before
executing anything!
git clone https://github.com/nailgun/telejournal
cd telejournal/
sudo make install
If you want to update, but not override the configuration, you can install only the script and systemd unit.
git pull
sudo make update
The Makefile
creates backups when overriding files. If you wish to change
that, you can set the BACKUP
variable.
See the documentation of install for further details.
sudo make update BACKUP=none
To send notifications via Telegram you need a bot token
and your
personal chat_id
. To create both, please see the documentation of the
BotFather.
Once obtained, both secrets need to be configured in
/usr/local/etc/telejournal/telegram.env
.
To send notifications with --user
units, you need to add the above bot secrets
(or a new pair) to ~/.config/telejournal/telegram.env
.