How-To Create Custom Azure Backup Reports Using the Data Model
With the recent release of the Azure Backup Reports by the Azure Backup team, we now are starting to gain insight and visibility into our backups.
Sure, we can navigate to the Recovery Services Vault (RSV) in the Azure portal to check for any errors, issues, etc. But we can gain far more value through the customization we can achieve with PowerBI.
Azure Backup Reports Data Model
As part of the release of the PowerBI content pack, the Azure Backup team also thoughtfully included documentation on the data model that is created and used.
By using this data model, not only can we modify the existing reports provided, but we can also create our own reports.
The Data Model currently contains 9 tables, and has 108 fields!
- Alert (11 fields)
- Backup Item (12 fields)
- Calendar (11 fields)
- Job (14 fields)
- Policy (28 fields)
- Protected Server (13 fields)
- Storage (5 fields)
- Time (6 fields)
- Vault (8 fields)
Creating a Custom Azure Backup Report
Using this data model, we can create a custom report, using the data that’s provided through the Recovery Service Vault.
After you have successfully configured and deployed the Azure Backup Reports, specifically, setting up the PowerBI component, you should now have an Azure Backup dataset.
The Azure Backup PowerBI content pack gives us a great start to see what we can achieve, but let’s see what else we can do with a custom report.
If you select the Azure Backup dataset, you will be presented with a blank canvas page. From there, you will need to find the various Fields you are interested in, and develop your own custom report.
Here is an example of a custom report I developed, to give you an idea. It may be a little plain, but it demonstrates how you can mix and match fields from different tables (i.e. Backup Item, Job, Protected Server, etc.) to be able to visualize and list exactly the information you are looking for.
You can additionally export these reports to Excel, PowerPoint etc. and also append it with specific fields to your organization for further use.
But wait, there’s more!
Using PowerBI Desktop
Using PowerBI online is fine, but I personally prefer to use PowerBI Desktop to develop my dashboards and reports, and then upload them to the online service. This provides me with more flexibility to achieve exactly what I want.
But how do we connect to the Azure Backup dataset in PowerBI Desktop? And, while we’re on the topic, if you are using the Log Analytics (aka OMS) integration (which, it itself can create/send datasets to PowerBI as well), there is no clear way to connect to an OMS-created dataset to PowerBI Desktop.
Ah, but there is.
In PowerBI Desktop, if you select Get Data, and navigate to Online Services. From there you should see an option for PowerBI Service. Click Connect.
You will be prompted to log into your PowerBI account, after which, you will be able to select any dataset that is attached to your service workspace.
Now you can work in PowerBI Desktop to develop your custom dashboards and reports. Also of note, is the fact that you can now view the hidden fields that are not exposed in PowerBI Online. If you right-click on one of the Field tables and choose ‘View hidden‘, you will then be able to see not only the hidden tables but also the hidden fields within the primary 9 data model tables.
PowerBI Online vs. PowerBI Desktop
One of the main differences with PowerBI Desktop is that it allows us to create new custom fields, measures, etc.
Normally, when you connect to a data source in PowerBI Desktop, you can access the data model relationship, preview the data contained in the tables, and create all the modifications you want.
Because we’re connecting to the PowerBI Online service, we do not get all these features and options. We can, however, create a new Measure to aid in our visuals.
For example, the Storage table has a field called ‘CloudStorageInMB’. But what if you have Gigabytes or Terabytes of data contained in the Recovery Services Vault? We don’t want some large Megabyte-based number, but something more relevant.
We can create a new Measure, and use the formula: Measure = [CloudStorageInMB] * 1024 to produce a number that represents Gigabytes, or you can add to the calculation to represent Terabytes.
Once you have completed your custom report, you can Publish it back to PowerBI Online. The custom field will remain, although it is unclear how this will affect subsequent data refreshes since no new dataset is created (I’m not a PowerBI guru).
Conclusion
The out-of-the-box Azure Backup Reports are great, and definitely get you started nicely. But, if you want further customizations, you can either modify the existing reports, make copies of the originals and modify them as needed, or create completely new custom reports and dashboards.
Nice work Azure Backup Team, we look forward to more to come.