Hacked up version of tailing a file to send to Telegram reliably.
Uses https://github.com/minfrin/retry and https://pypi.org/project/telegram-send/.
git clone [email protected]:hugoh/tail-to-telegram.git
cd tail-to-telegram
./setup.sh
Configure Telegram with:
. ./venv/bin/activate
telegram-send --config ./telegram.conf --configure
Create a ttt.conf
that looks like:
TELEGRAM_CONF=telegram.conf
TAILED_FILES=(/var/log/syslog)
DELAY=30 # retry every 30 seconds
TIMES=1830 # retry for a week (give or take)
./tail-to-telegram.sh