Get Docker Notifications with Telegram Bot

Published: 13 January 2021
on channel: DB Tech
10,778
297

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/4fe...

Original source: https://hub.docker.com/r/poma/docker-...

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/bot146740768...

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:
   / @dbtechyt  

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:
   • Raspberry Pi 4 Home Server  


/=========================================/

Remember to leave a like on this video and subscribe if you want to see more!

/=========================================/

Like what I do? Want to be generous and help support my channel? Here are some ways to support:

Patreon: https://dbte.ch/patreon
Ko-fi: https://dbte.ch/kofi

/=========================================/

Here's my YouTube Merch Store:
https://dbte.ch/ytstore

/=========================================/

Here's my Amazon Influencer Shop Link:
Amazon: https://dbte.ch/amazonshop


/=========================================/

Follow Me:
Twitter: https://dbte.ch/tw
Facebook: https://dbte.ch/fb
Subscribe: https://dbte.ch/ytsub


Watch video Get Docker Notifications with Telegram Bot online without registration, duration hours minute second in high quality. This video was added by user DB Tech 13 January 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 10,77 once and liked it 29 people.