Get Docker Notifications with Telegram Bot

Опубликовано: 13 Январь 2021
на канале: 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


Смотрите видео Get Docker Notifications with Telegram Bot онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь DB Tech 13 Январь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 10,77 раз и оно понравилось 29 людям.