Skip to content

Send Veeam B&R session summary notifications to Discord, Slack, and Teams.

License

Notifications You must be signed in to change notification settings

aptfinf/VeeamNotify

Repository files navigation

VeeamNotify

WORK IN PROGRESS

Send Veeam Backup & Replication session summary notifications to Discord, Microsoft Teams, and Slack, detailing session result and statistics and optionally alerting you via mention when a job finishes in a warning or failed state.

Notification Example

Installing

  • Option 1 - Install script. This option will also optionally configure any supported Veeam jobs to work with VeeamNotify.

    1. Download VeeamNotify-Installer.ps1.
    2. Open PowerShell (as Administrator) on your Veeam server.
    3. Run the following commands:
      PS> Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted -Force
      PS> Unblock-File C:\path\to\VeeamNotify-Installer.ps1
      PS> C:\path\to\VeeamNotify-Installer.ps1
      Installer Example
  • Option 2 - Manual install

Supported Job Types

  • VM Backup
  • VM Replication
  • Agent jobs managed by backup server

Agent job caveats

Due to limitations caused by the way some types of Veeam Agent jobs are executed, only Agent jobs of type "Managed by backup server" support post-job scripts. Such jobs will show up as follows:

  • In Veeam Backup & Replication Console, with type "Windows/Linux Agent Backup". If you see "Windows/Linux Agent Policy", this job is not supported.
  • In Veeam Backup & Replication PowerShell module, with type "EpAgentBackup". If you see "EpAgentPolicy", this job is not supported.

You can read about the difference between these two Agent job types here.

Unfortunately, even Agent backup sessions managed by the backup server, while supported, are limited in data output.
As much relevant information as I've been able to discover from such backup sessions is included in the notifications, but I welcome any suggestions for improvement in this area.

Configuration options

Configuration can be found in C:\VeeamScripts\VeeamNotify\config\conf.json

Name Type Required Default Description
webhook string True null Your webhook URL.
discord_userid string False null Your Discord user ID. Required if either of the mention_ options below are true.
slack_userid string False null Your Slack member ID. Required if either of the mention_ options below are true.
teams_upn string False null Your user UPN for Teams. Required if either of the mention_ options below are true.
mention_on_fail boolean False False When true, you will be mentioned when a job finishes in a failed state. Requires that userid is set.
mention_on_warning boolean False False When true, you will be mentioned when a job finishes in a warning state. Requires that userid is set.
notify_update boolean False True When true, the script will notify (but not mention) you on Discord if there's a newer version available.
self_update boolean False False When true, the script will update itself if there's a newer version available.
debug_log boolean False False When true, the script will log to a session-specific file in C:\VeeamScripts\VeeamNotify\logs\
thumbnail string False See example above Image URL for the thumbnail shown in the report embed.

Credits

MelonSmasher//TheSageColleges for the project which inspired this one. Much of MelonMasher's codebase was incredibly useful.
dantho281 for various things - Assistance with silly little issues, the odd bugfix here and there, and the inspiration for and first works on the Updater.ps1 script.
Lee_Dailey for general pointers and the first revision of the ConvertTo-ByteUnit function.
philenst for the DeployVeeamConfiguration.ps1 script.
s0yun for the Installer.ps1 script.

Thank you all.

About

Send Veeam B&R session summary notifications to Discord, Slack, and Teams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%