VeeamSlackNotifications has been replaced by VeeamNotify.
This repository is now archived.
Sends notifications from Veeam Backup & Restore to Slack
We'll be using PowerShell to get started with this.
Please connect to your Veeam server and open PowerShell as an administrator. I ask that you open PowerShell on your Veeam server as some of the instructions will not work over a remote PS session. You may use a remote PS session and adapt the instructions if you like, but I'm not responsible if you break anything (though that would be quite hard to do with what I'm telling you to do here).
Make a scripts directory: C:\VeeamScripts
New-Item C:\VeeamScripts PowerShell -type directory
There may be later releases so take a look and replace the version number in the commands below with the latest if applicable.
Download the archive and rename it to something recognisable.
Invoke-WebRequest -Uri https://github.com/tigattack/VeeamSlackNotifications/archive/2.4.zip -OutFile C:\VeeamScripts\VeeamSlackNotifications-2.4.zip
You may recieve an SSL error as in some cases winhttp uses TLS1 by default (depends on a few things), and GitHub appears to no longer accept TLS1. If you receive this error, run the following command and then re-issue the above command.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Expand-Archive C:\VeeamScripts\VeeamSlackNotifications-2.4.zip -DestinationPath C:\VeeamScripts
Ren C:\VeeamScripts\VeeamSlackNotifications-2.4 C:\VeeamScripts\VeeamSlackNotifications
rm C:\VeeamScripts\VeeamSlackNotifications-2.4.zip
Edit your config file. You must replace the webhook field with your own webhook.
notepad.exe C:\VeeamScripts\VeeamSlackNotifications\config\conf.json
You may also need to set your PowerShell execution policy to Unrestricted.
Set-ExecutionPolicy Unrestricted
If you don't want to do that, replace the script path in section 5 below with the following
Powershell.exe -ExecutionPolicy Bypass -File C:\VeeamScripts\VeeamSlackNotifications\SlackNotificationBootstrap.ps1
Unblock the script files if you're still having issues after setting the PowerShell execution policy. The reason you may need to do this is Windows often blocks execution of downloaded scripts.
Unblock-File C:\VeeamScripts\VeeamSlackNotifications\SlackNotificationBootstrap.ps1
Unblock-File C:\VeeamScripts\VeeamSlackNotifications\SlackVeeamAlertSender.ps1
Unblock-File C:\VeeamScripts\VeeamSlackNotifications\Helpers\Helpers.psm1
Repeat this for each job that you want to be reported into Slack.
- Right click the job and click "Edit".
- Go to the "Storage" section and click on the
button.
- Go to the "Scripts" tab and configure as shown below.
Powershell.exe -File C:\VeeamScripts\VeeamSlackNotifications\SlackNotificationBootstrap.ps1