A simple python script that monitors a log file for strings and sends notifications to Telegram.
I started learning Python not long ago and thought that I may as well write something that I would use. This is the fruit of my first few days of Python. I know, it's fairly rough.
I use this to follow my Minecraft server's log. Everytime my kids or their friends connect, I get a notification. Awesome.
Of course, you can use it to monitor any log file.
- telegram-send (https://pypi.org/project/telegram-send/)
- A Telegram bot (https://core.telegram.org/bots)
- Ensure that you configure telegram-send with your telegram API keys.
- Error handling
- Log file rotation