Collaboration | Veeam B&R Telegram Notifications!!

  • 12 February 2023
  • 3 comments
  • 719 views

Userlevel 7
Badge +7

Hi everyone,
It's being a while since this idea came to my mind, I want to be notified differently that mail, more accurate and clean, my mailbox is always a mess, and I get too much mails to read them all, and start pending on critical alerts and other stuff.

I put together a powershell script, a schedule task and a few things in Windows Server where my Veeam B&R V12 is installed, and I managed to receive in a telegram bot the windows events related to Veeam tasks.

Very basic, Im not programming skilled or anything like that, 
do you want to help and contribute to improve and develop this idea?

here I share what I've done and shared to anyone who wants to help, participate and use this workaround.

  1. I created a Telegram Bot with BotFather, here the link With normal steps.
  2. Then, we need to also get our ID, here the link for a very simple explanation
  3. save the ps1 file in a reachable place for you later, this is the code I used:
    Function Send-Telegram {
    Param([Parameter(Mandatory=$true)][String]$Message)
    $Telegramtoken = "YOUR_TELEGRAM_TOKEN"
    $Telegramchatid = "YOUR_ID"
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    $Response = Invoke-RestMethod -Uri "https://api.telegram.org/bot$($Telegramtoken)/sendMessage?chat_id=$($Telegramchatid)&text=$($Message)"}

    $A = Get-WinEvent -MaxEvents 1 -FilterHashTable @{Logname = "Veeam Backup"}
    $Message = $A.Message
    $MachineName = $A.MachineName
    $Source = $A.ProviderName

    Send-Telegram $Message
  4. now, program a schedule task with the parameters shown in the screenshots
    as you can see here, app is powershell.exe  argument: full path of the ps1 file with eh code saved previously.

    then I edited the task, and added an extra trigger and edited other parameters, also shown in some screenshots now

     

  5. the result I get is a Telegram Message any time something goes with the VBR Console, Backups Tasks, Config modifications, etc.

Please collaborate to improve this idea and process, to all get the benefit of another way to get notified by Veeam regarding our VBR consoles!

Feel free to use, modify, create, etc…
Let's collaborate and make it a big thing.

Cheers!


3 comments

Userlevel 7
Badge +11

Interesting @HunterLAFR! I like the option of telegram notifications.

It was a while that I used it on the last time. I did not understand preciously the connection with Azure portal. 

What exactly I need to do on there?

 

Userlevel 7
Badge +7

Interesting @HunterLAFR! I like the option of telegram notifications.

It was a while that I used it on the last time. I did not understand preciously the connection with Azure portal. 

What exactly I need to do on there?

 

Hey! Thanks for that!

The azure web is just for the information of creating the telegram Bot, the instructions are very well explained.

just take it for that. 😄

Userlevel 7
Badge +8

That is really cool. 

Comment