Veeam ONE is a complete monitoring system for VMware, Hyper-V, Veeam and even at the application level being able to monitor VM services and processes running Microsoft Windows, without the need to install any agent, and all through API.
As Rick Vanover usually says, Veeam ONE will surely tell us more than one thing about our environment that we don’t know, and Rick is right, with several hundred metrics that Veeam ONE collects, added to the several dozen reports that are included by default, Veeam ONE is that co-worker that we all would like to have in our IT team.
Veeam ONE allows you to create notifications for each predetermined alarm or alarms that we create ourselves. While it is true that email notifications are the most basic and the ones we probably configure by default, sadly, it is true that email has become a tool overloaded with daily content, and most likely if a critical alarm falls in a folder or inbox along with 150 other emails, it will not pay the attention it requires.
That’s why in this blog post we are going to see how to send the most critical notifications that we have to different channels in Microsoft Teams or Slack, not only because we are all more attentive to these communication tools, but because it is really easy to configure certain alarms depending on their importance and type of alarm, to the most relevant teams to solve and treat the alarm.
Veeam ONE notifications attributes
Veeam ONE allow us to export the information of the alert into plain text, so we can parse this information and send it to external tools. Starting since Veeam ONE v9.5 Update 4, we can also get an unique alarm ID, which is perfect to combine these notifications with external remediation and tracking tools like ServiceNow, Remedy, etc.
Here you can find all the information that Veeam ONE creates on every single alarm, and the attribute which you can use to retrieve what it is the most important for you:
- %1 – Alarm name
- %2 – Affected object name
- %3 – Alarm summary
- %4 – Time
- %5 – Alarm status
- %6 – Previous alarm status
- %7 – Alarm ID
Using Microsoft Teams to receive Veeam ONE notifications
Microsoft Teams has become a really important tool, the easy to use, included with the Microsoft Office Suite, and with tight integration across the rest of Microsoft Office 365 products, Microsoft Teams it is by default the most used tool in our daily basis.
In order to receive alerts into a Microsoft Teams Channel, we will need to create an incoming webhook unique URL on the Channel, to achieve that, please right click on said Channel – Connectors:
Select now Incoming Webhook, and click Configure:
We can then configure a few parameters like the name of the name of the Webhook which will publish into our Microsoft Teams Channel, and the icon to make it look more corporate:
After we have done this, we will be able to see our unique Incoming Webhook URL, which we should copy and save it somewhere safe, as we will need it on the next steps:
Now that we have Microsoft Teams ready, please connect via Remote Desktop to your Veeam ONE Server. Then, please download the next script from our Community VeeamHub, and add your Microsoft Teams incoming Webhook, additionally, you can as well edit the text of the notification as much as you like, please bear in mind the notification should be useful for those reading it:
We have everything ready now on Microsoft Teams and on the Script side, please jump to the section called Veeam ONE Configuration to Send Notifications.
Using Slack to receive Veeam ONE notifications
Slack is the neural point of communication of half the world, the great disruptor in this space of instant communication, arrived just in time in which IRC was already seen as obsolete, in which forums did not allow communication in real time, much less collaborate in real time regarding development, ideas, etc.. That’s why in these steps we’ll see how to send alerts to Slack as well.
Depending on the amount of Webhooks you have available in your Slack channels, this will work or give you an error, simply go to this link, select on the top right the Slack you want to create the Webhook:
And we will appear something like this, we will select the channel where we want to send alerts:
This will give us a unique code that we will use in the scripts below:
Slack has its own PowerShell Module that allow us to do much more with the notifications, for the purpose of this exercise, on the Veeam ONE Server, we will need to install the next PowerShell Module:
We may not have the latest version of NuGet that is needed, so we’ll say Yes here:
NuGet provider is required to continue PowerShellGet requires NuGet provider version '188.8.131.52' or newer to interact with NuGet-based repositories. The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 184.108.40.206 -Force'. Do you want PowerShellGet to install and import the NuGet provider now? [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):
And finally, we will say A (Yes to All) in this question of whether we trust the module:
Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): A
Now that we have Slack ready, please connect via Remote Desktop to your Veeam ONE Server. Then, please download the next script from our Community VeeamHub, and add your Slack incoming Webhook, additionally, you can as well edit the text of the notification as much as you like, you can edit the icon as well, as of now it is pointing to a Veeam ONE icon, please bear in mind the notification should be useful for those reading it:
We have everything ready now on Microsoft Teams and on the Script side, please jump to the next section called Veeam ONE Configuration to Send Notifications.
Veeam ONE Configuration to send Notifications to Microsoft Teams or Slack
As said at the beginning of the article, this modern way to send notifications should not be applied generally to all the alerts and notifications from Veeam ONE, as it will flood the Teams or Slack channel, and nobody will look at it.
I recommend to just select the most critical alerts across your different teams, and then on Veeam ONE Monitor, under Alarm Management, select the most critical ones, click on Edit, then under Notifications, you can keep the email notification if you like but add a new one, under action should be Run script, under value it should be the next (please select the one you are sending Slack or Teams):
powershell.exe "C:\YOURPATHTOTHESCRIPTS\VeeamONE-Notification-(Slack-OR-Teams).ps1" '%1' '%2' '%3' '%4' '%5' '%6' '%7'
That’s it! You have done it, when the selected critical alarms will be triggered on the different objects, you will receive the notification on your Microsoft Teams like here:
Or, you will receive the alarm on your Slack Channel like you can see here:
I hope you’ll find these scenarios helpful and would love to hear your unconventional ideas that improved your workflow. Share them in the comments!