A lightweight webhook service that receives alert payloads from Graylog,
formats them into structured Telegram messages, and sends them via the Telegram Bot API.
It respects API rate limits and is easy to configure and deploy with Docker.
git clone git@github.com:onlinerby/alerto.git
cd alertopython3 -m venv env
source env/bin/activatepip3 install --upgrade pip
pip3 install -r requirements.txtCreate a local .env file:
cp .env.example .envThen edit it and set the following variables:
AUTH_TOKEN— Bearer token required for incoming webhook requestsGRAYLOG_URL— Web URL of the Graylog dashboard (admin panel)TELEGRAM_TOKEN— API token from @BotFatherCHAT_ID— ID of the chat where bug reports should be deliveredMAX_MESSAGES_PER_MINUTE— Telegram rate limit (messages per minute)
Tip
If AUTH_TOKEN is not set, authentication is disabled, and anyone can POST alerts to your endpoint.
For production, it’s strongly recommended to define a secure token.
Caution
Keep your tokens and API keys safe — they grant full control over your bot.
python app.py
This command starts the built-in aiohttp development server.
By default, it listens on http://localhost:8080.
git clone git@github.com:onlinerby/alerto.git
cd alertocp .env.example .env
# Fill in your TELEGRAM_TOKEN, CHAT_ID, and optionally AUTH_TOKENdocker build -t alerto .
docker run --rm -p 8080:8080 --env-file .env alertoNote
To create a bot and get your API token, message @BotFather and follow the instructions:
Telegram Bot Guide →
An example payload is available in graylog.json.
You can use it to test the service locally:
curl -X POST http://localhost:8080 \
-H "Authorization: Bearer <auth token>" \
--data @graylog.jsonFor a full setup walkthrough — including Graylog stream, pipeline, and event definition —
see the detailed documentation:
Integration Guide →
Released under the MIT License.