Azure Proactive Resiliency Library v2
Tools Glossary GitHub GitHub Issues Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Analyzer Script

Overview

This Data Analyzer script is the second script used during Well-Architected Reliability Assessment (WARA) engagements. Based on the data generated by the Collector script, the Data Analyzer script collects the necessary information about recommendations from the Azure Proactive Resiliency Library (APRL) and generates an Action Plan Excel spreadsheet. The goal of this tool is to summarize the collected data and provide actionable insights into the health and resiliency of the Azure environment.

Requirements

  • Windows OS
  • PowerShell 7
  • Git
  • Microsoft Excel installed
  • Role Based Access Control: Reader role to access to resources to be evaluated. Although access to the Azure Subscriptions is not required to run the script, the access will be required for the user to complete some manual validations of configurations of Azure resources after the script generates the Excel file.

Quick Start (Local Machine only - Cloud Shell is not supported)

  • Download and run the analyzer script by copying and modifying this script block
  • Once the script is downloaded you can execute it by running ./2_wara_data_analyzer.ps1
#Create new "WARA" directory under C:\ and navigate to C:\WARA. If not Windows then do nothing and move on.
$iswindows ? $(mkdir C:\WARA -ErrorAction SilentlyContinue;cd C:\WARA) : (Write-Host "C:\WARA - Not Required")

#Download the latest version of the script
invoke-webrequest https://aka.ms/aprl/tools/2 -out 2_wara_data_analyzer.ps1

#Remove file blocking if active and running windows
$iswindows ? (unblock-file ./2_wara_data_analyzer.ps1) : (Write-host "Unblock not required - Not Windows OS")

#Modify these parameters and run the script
./2_wara_data_analyzer.ps1 -JSONFile .\WARA_File_2024-08-08-11-57.json

How to Download

How to run the script

The Data Analyzer script must be run from a Windows Machine with Excel installed.**
  1. Change your directory to the same location that you have downloaded the WARA Data Analyzer script to.

    • We recommend running this as close to your C:\ as path to avoid errors related to file path length.
  2. Execute script pointing the -JSONFile parameter to file created by the WARA Collector script.

    • The script accepts both short and/or full paths.
  3. Select “R” to allow script to run

  4. After the script completes it will create a file called WARA Action Plan.xlsx to the same file path.

Action Plan Analysis

  1. Once the script has completed, open the Excel Action Plan and familiarize yourself with the structure of the file, generated data, resources collected, pivot tables, and charts created.
    • These are the worksheets:
      • Recommendations: you will find all Recommendations, their category, impact, description, learn more links, and much more.
        • Note that Columns A and B are counting the number of Azure Resources associated with the RecommendationID.
      • ImpactedResources: you will find a list of Azure Resources associated with a RecommendationID. These are the Azure Resources NOT following Microsoft best practices for Reliability.
      • Other-OutOfScope: you will find a list of the Resources that are Out of Scope of the WARA engagement based on the ResourceTypes, after all filters have been applied.
      • ResourceTypes: you will find a list of all ResourceTypes the customer is using, number of Resources deployed for each one, and if there are Recommendations for the ResourceType in APRL.
      • Outages: you will find a list of all the outages that impacted the subscriptions (this worksheet might not exist if there are no Outages to be found).
      • Retirements: Azure services or features that are retired. You will find a list of all the next retirements in the subscriptions (this worksheet might not exist if there are no Retirements to be found).
      • Support Tickets: you will find a list of all the Support Tickets for the subscriptions in the past 6 months (this worksheet might not exist if there are no Support Tickets to be found).
      • PivotTable: you will find a couple of pivot tables used to automatically create the charts
      • Charts: you will find 3 charts that will be used in the Executive Summary PPTx
    • At this point, all Azure Resources with recommendations and Azure Resource Graph queries available in APRL, were automatically validated. Follow the next steps to validate the remaining services without automation or that does not exist in APRL yet.
  2. Go to the ImpactedResources worksheet, filter Column B by IMPORTANT, and validate manually the remaining resources for reliability.
    • IMPORTANT - Query under development - For each Azure Resource in each row in this category, the resource could not be validated automatically because the associated recommendation in APRL does not have a KQL/Azure Resource Graph Query yet, thus manual validation is necessary. Using the GUID of the Recommendation, go to the “Recommendations” worksheet, read the recommendation, then open the Azure Portal and validate if the resource is compliant with the recommendations. If it is compliant, delete the row.
    • IMPORTANT - Recommendation cannot be validated with ARGs - Validate Resources manually - For each Azure Resource in each row in this category, the resource could not be validated automatically because the associated recommendation in APRL is not possible to be validated with KQL/Azure Resource Graph Query, thus manual validation is necessary. Using the GUID of the Recommendation, go to the “Recommendations” worksheet, read the recommendation, then open the Azure Portal and validate if the resource is compliant with the recommendations. If it is compliant, delete the row.
    • IMPORTANT - ServiceType Not Available in APRL - Validate Resources manually if Applicable, if not delete this row - For each Azure Resource in each row in this category, the resource could not be validated automatically because there are no recommendations in APRL or Advisor for the Service, thus manual validation is necessary. Based on the Azure Documentation for each Service, go to the “Recommendations” worksheet, create your own recommendations for Reliability, then open the Azure Portal and validate if the resources are compliant with the recommendation you created. If they are compliant, delete the rows in the “ImpactedResources”.
  3. Remove/add any recommendations based on your analysis prior to generating reports
  4. For relevant Outages, all Service Retirements, and relevant Support Tickets, create actionable Recommendations in the “Recommendations” worksheet.
  5. Once all manual validations of the resources in the “ImpactedResources” worksheet categorized by “IMPORTANT” are completed, and all recommendations for Service Retirements, Support Tickets and Outages were created in the “Recommendations” worksheet, the Action Plan is completed and it is time to run the last script that will generate final reports in Word and PowerPoint formats.
  6. Read how to execute the Reports Script to generate the final Word and PowerPoint reports.

PARAMETERS

Debugging

Switch to enable debugging mode.

  • Required: No
  • Position: Named

Help

Switch to display help information.

  • Required: No
  • Position: Named

JSONFile

Path to the JSON file created by the 2_wara_data_analyzer.ps1 script.

  • Required: Yes
  • Position: 0

EXAMPLES

Example 1

.\2_wara_data_analyzer.ps1 -JSONFile '.\WARA_File_2024-04-01-10-01.json'