Get Docker Notifications with Telegram Bot
DB Tech
In this video we'll look at how to get Telegram notifications from our server any time there's a status change to one of our containers.
The process is pretty straightforward once you know where to go and what to do.
Here is the stack we'll use: https://gist.github.com/dnburgess/4fe1f4f8a577ffe8ab846fc0e9fd1b69
Original source: https://hub.docker.com/r/poma/docker-telegram-notifier
Here are the instructions on how to setup a Telegram Docker notifier bot:
You'll need a Telegram account.
Message @botfather to create a new bot
Send the message: /newbot
Give the bot a name. I called mine DB Tech Notifier
Give the bot a username: somename_bot (must end in _bot)
The botfather will then respond with a bit of information.
Make note of the HTTP API. Will look like: 1467407682:AAH9Wji8AA5YYivcCbiF1OPjOI_BaYWbPOk
Click the link he gives you to start a chat with your new bot.
Then click Start.
Then type a few things in the chat to get some data in the API response we're going to need in a moment.
Next, we need to go to a URL to get our chat id.
Go here: https://api.telegram.org/bot(your HTTP API goes here)/getUpdates
The URL should look like this: https://api.telegram.org/bot1467407682:AAH9Wji8AA5YYivcCbiF1OPjOI_BaYWbPOk/getUpdates
Find the Chat ID in the API response that shows on the screen and make note of it.
Now, copy and paste the stack from above into a new Portainer stack.
Replace the HTTP API and the Chat Id in the stack.
Deploy the container.
Join this channel to get access to perks: https://www.youtube.com/channel/UCVy16RS5eEDh8anP8j94G2A/join
The hardware I'm using in my Raspberry Pi Home Server:
- Raspberry Pi 4 8GB
- Argon One M.2 Case
- Silicon Power 256GB Boot Drive
- Sabrent 2TB Rocket NVMe PCIe M.2 Storage Drive
- Sabrent USB 3.2 Tool-Free NVMe Enclosure
Currently the Argon One M.2 case is NOT currently available on Amazon, but you can get it on their website: https://dbte.ch/argononem2
AFFILIATE LINKS: You can get their standard (non-M.2) Argon One case here: https://amzn.to/3ouFtnx Silicon Power 256GB A55 M.2 SSD: https://amzn.to/2G00chM Sabrent 2TB Rocket NVMe PCIe M.2: https://amzn.to/3ovZmuv Sabrent USB 3.2 Tool-Free NVMe Enclosure: https://amzn.to/35xruVG CanaKit Raspberry Pi 4 8GB: https://amzn.to/2FZDvKA
Porkbun .click and .link domains for $0.99! https://porkbun.com Coupon Code: DBTECH Limit 3 per customer. Good through 12-31-2020
Sponsor Links: https://www.argon40.com/ https://www.sabrent.com/ https://porkbun.com
More Raspberry Pi Home Server Videos: https://www.youtube.com/playlist?list=PLhMI0SExGwfAU-UMeKxd1Lu5_a60AlA9N
/=========================================/
Remember to leave a like on this video and subscribe if you want to see more!
/=========================================/
Like what I ... https://www.youtube.com/watch?v=rW4V-14p05s
78061105 Bytes