Enhanced HTML Reporting - Veeam Backup for AWS, Azure, and Office 365

  • 20 September 2021
  • 5 comments
  • 141 views

Userlevel 6
Badge +2

Greetings everyone, for years we all have been configuring our SMTP notifications on Veeam Backup and Replication to start receiving emails about the jobs, etc. Probably is the second or third thing we do after installing VBR.

Now, that is great, but at the same time is true that Veeam Backup for AWS/Azure/Office 365 SMTP Notifications are not the same as what we are used in VBR, until today!

I am pleased to share here with you, some Community work I have built using the comprehensive, feature-rich, RESTful API these products include, keen to hear your feedback. The how-to of every script it is something similar to this:

  • We have our products which exposes RESTful API
  • We have a bash shell script to collect data from the API
  • The bash shell script sends the data to the specified address, or addresses

This post might be a bit long, so keep scrolling to the HTML Report you need.

Enhanced HTML Report for Veeam Backup for AWS

This Script will query the Veeam Backup for AWS API and save the job sessions stats for the last 24 hours. Then it saves it into a comfortable HTML, and it is sent over EMAIL.

How-to:

  • Download the veeam_aws_email_report.sh file and change the parameters under Configuration, like username/password, etc. with your real data
  • Make the script executable with the command chmod +x veeam_aws_email_report.sh
  • Run the veeam_aws_email_report.sh and check under the folder you defined, that you have your HTML Report
  • Schedule the script execution, for example every day at 00:05 using crontab
  • You will need mailutils on your server in order to send Emails - And most likely have a proper SmartHost to rely your email
  • Enjoy :)

Enhanced HTML Report for Veeam Backup for Azure

This Script will query the Veeam Backup for Azure API and save the job sessions stats for the last 24 hours. Then it saves it into a comfortable HTML, and it is sent over EMAIL.

 How-to:

  • Download the veeam_azure_email_report.sh file and change the parameters under Configuration, like username/password, etc. with your real data
  • Make the script executable with the command chmod +x veeam_azure_email_report.sh
  • Run the veeam_azure_email_report.sh and check under the folder you defined, that you have your HTML Report
  • Schedule the script execution, for example every day at 00:05 using crontab
  • You will need mailutils on your server in order to send Emails - And most likely have a proper SmartHost to rely your email
  • Enjoy :)

Enhanced HTML Report for Veeam Backup for Office 365

The native HTML Report VBO includes is great but does not give an option to run it per job, and Daily for example, plus send to the email address of your choice (thinking of Service Providers here).

I understand those are quite important, as, with the SaaS offerings, we tend to protect those workloads with an improved RPO, like doing Backups more often, even every x minutes, etc. If you follow all the steps, you will have something similar to this on your email every day:

 How-to:

  • Download the veeam_microsoft365_email_report.sh file and change the parameters under Configuration, like username/password, etc. with your real data
  • Make the script executable with the command chmod +x veeam_microsoft365_email_report.sh
  • Run the veeam_microsoft365_email_report.sh and check under the folder you defined, that you have your HTML Report
  • Schedule the script execution, for example every day at 00:05 using crontab
  • You will need mailutils on your server in order to send Emails - And most likely have a proper SmartHost to rely your email
  • Enjoy :)

How-to Send Emails using STARTTLS, and Secure Relays

You will need the next package if you want to send emails securely that lands properly to Gmail, Office 365, etc.

Install s-nail

sudo apt-get install -y s-nail

This will allow us to use a better, and modern, way of sending emails. Now with the package downloaded, we need to edit the system settings for email:

vi ~/.mailrc

Inside the file, which might be empty first time you open it, introduce the next:

set smtp-use-starttls
set ssl-verify=ignore
set smtp=smtp://YOURSMTPSERVER:587
set smtp-auth=login
set smtp-auth-user="YOURUSER@YOURDOMAIN.COM"
set smtp-auth-password="YOURPASSWORD"
set from="YOURFROMEMAIL@YOURDOMAIN.COM"

That’s everything guys, as you can see, it is not difficult to recollect data from the API, and put it into something great like an email. This code can be used for Service Providers to just query the Jobs they want, to send it for example to different tenants, etc. There is no limit. Hope you find it useful!


5 comments

Userlevel 7
Badge +5

This is great info as we are always looking at better ways to report on O365.

Userlevel 7
Badge +3

Nice post as always @jorge.delacruz:fire:

Userlevel 7
Badge +2

Thank you for sharing @jorge.delacruz 

Userlevel 7
Badge +4

Very interesting. Thank for sharing your scripts. 😎👍🏼

Userlevel 6
Badge +2

Thanks so much, guys, if you try any of them, and you have feedback, ideas, or “feature requests” let me know, extremely happy to be of help.

Comment