This action allows you to send custom messages to a Telegram channel, group or user using a bot when your monitor suites finish their execution.
To use this action you need to provide the Telegram bot token in your settings.py
file as follows:
# settings.py
SPIDERMON_TELEGRAM_SENDER_TOKEN = '<TELEGRAM_SENDER_TOKEN>'
SPIDERMON_TELEGRAM_RECIPIENTS = ['chatid', 'groupid' '@channelname']
A notification will look like the following:
Follow these steps <configuring-telegram-bot>
to configure your Telegram bot.
The following settings are the minimum needed to make this action work:
List of recipients of the message. It could be a user id, group id or channel name.
Bot Authorization Token of your bot.
Warning
Be careful when using bot user tokens in Spidermon. Do not publish bot user tokens in public code repositories.
Other settings available:
Default: False
If set True, the Telegram message content will be in the logs but nothing will be sent.
The message to be sent, it supports Jinja2 template formatting.
Path to a Jinja2 template file to format messages sent by the Telegram Action.