Telegram Notifier¶
Kibitzr supports sending notifications through Telegram IM. Setup process consists of 4 steps:
Create Bot with BotFather
Save telegram token to
kibitzr-creds.yml
Write a message (anything) to you new bot
Run
kibitzr telegram-chat
Save the result to
kibitzr-creds.yml
Configuration¶
Telegram bots don’t have an ability to search for users, that’s why one have to write a message to bot instead of providing username in configuration. Also, bots have a short memory. Message sent a week ago will be likely inaccessible for a bot. That’s why, you have to save chat id explicitly. Kibitzr will send messages to chat, where first message was sent to bot (like filial imprinting).
Telegram has a maximum message length of 4096 utf-8 characters. Telegram Notifier will
check this for you and split the message in to multiple messages of 4096 characters each.
This mechanism is a fail-safe to deliver your message even when it’s over the limit. When
planning on often sending larger message consider using option split-on
.
Messages doesn’t necessarely get delivered, by the telegram network, in the same order
that they are sent because of it async nature.
Example of kibitzr-creds.yml
file:
telegram:
token: 334539109:ABHCRz_snz8554qsSlIIotMaNFWB3p8P84
chat: 118860645
Also chat identifier can be configured for each check in kibitzr.yml
using following syntax:
checks:
...
notify:
- telegram: 118860645
Optionally can be configured to split in to multiple messages by setting split-on
:
checks:
...
notify:
- telegram:
chat: 118860645
split-on: "\n"