A lightweight Telegram alerter for Komodo.
✅ OK - StackAutoUpdated
For: komodo (Stack)
Resolved: ✅
Data: {
"id": "685db922720baf6840daffca",
"name": "komodo",
"server_id": "6849fbcd598b3a0bc1570303",
"server_name": "docker-1",
"images": [
"mongo:latest"
]
}
Create a new Stack with the following compose.yaml file:
services:
komodo-telegram-alerter:
container_name: komodo-telegram-alerter
image: sashabusinaro/komodo-telegram-alerter:latest
restart: unless-stopped
ports:
- '3000:3000'Traefik Example
services:
komodo-telegram-alerter:
container_name: komodo-telegram-alerter
image: sashabusinaro/komodo-telegram-alerter:latest
restart: unless-stopped
# ports:
# - '3000:3000'
networks:
- proxy
labels:
traefik.enable: 'true'
traefik.docker.network: proxy
traefik.http.routers.komodo-telegram-alerter.entrypoints: websecure
traefik.http.routers.komodo-telegram-alerter.rule: Host(`komodo-telegram-alerter.${DOMAIN}`)
traefik.http.routers.komodo-telegram-alerter.tls: 'true'
traefik.http.routers.komodo-telegram-alerter.tls.certresolver: cloudflare
traefik.http.services.komodo-telegram-alerter.loadbalancer.server.port: '3000'
networks:
proxy:
external: trueIn Komodo, add a Custom Alerter with the following URL:
http://<komodo-telegram-alerter-ip>:3000/alert?token=<TELEGRAM_TOKEN>&chat_id=<TELEGRAM_CHAT_ID>
Or, leverage Komodo's interpolation:
http://<komodo-telegram-alerter-ip>:3000/alert?token=[[TELEGRAM_TOKEN]]&chat_id=[[TELEGRAM_CHAT_ID]]
Recommended: Use Komodo Secrets & Variables to store your Telegram credentials.
Traefik Example
https://komodo-telegram-alerter.[[DOMAIN]]/alert?token=[[TELEGRAM_TOKEN]]&chat_id=[[TELEGRAM_CHAT_ID]]
- Message @BotFather on Telegram
- Create a new bot with
/newbot - Follow the instructions to get your bot token
- Add your bot to the desired chat/channel
- Send a message to the chat
- Visit:
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Look for the
chat.idfield in the response