az-advisor
Get Azure best practice recommendations
TLDR
List Azure Advisor configuration for the entire subscription
Show Azure Advisor configuration for the given subscription or resource group
List Azure Advisor recommendations
Enable Azure Advisor recommendations
Disable Azure Advisor recommendations
SYNOPSIS
az advisor recommendation list [options]
az advisor recommendation show --name <recommendation-name> [options]
az advisor recommendation disable [--ids <ids> | --name <name>] [options]
az advisor configuration update --low-cpu-threshold <threshold> [options]
PARAMETERS
recommendation
Group of commands for managing Azure Advisor recommendations.
recommendation list
Lists all Azure Advisor recommendations for the current subscription or specified resource group.
recommendation show
Retrieves the details of a specific Azure Advisor recommendation by its name or ID.
recommendation disable
Disables one or more Azure Advisor recommendations. Useful for recommendations that are not applicable or already addressed.
recommendation enable
Enables a previously disabled Azure Advisor recommendation.
recommendation update
Updates the status of an Azure Advisor recommendation (e.g., sets to 'Dismissed' or 'Active').
configuration
Group of commands for managing Azure Advisor configurations.
configuration list
Lists Azure Advisor configurations for a subscription.
configuration update
Updates Azure Advisor configurations, such as setting the low CPU threshold for VM recommendations.
--name
Specifies the name of the recommendation or resource to act upon.
--ids
A space-separated list of resource IDs. Used to specify multiple recommendations or resources.
--low-cpu-threshold
Sets the CPU utilization threshold for low CPU recommendations (e.g., 5 for 5%). Used with configuration update.
--resource-group
Specifies the name of the resource group to filter recommendations.
--category
Filters recommendations by category (e.g., 'Cost', 'Security', 'Reliability').
--subscription
Specifies the Azure subscription to operate on. Overrides the default active subscription.
--output
Sets the output format (e.g., 'json', 'table', 'tsv').
--query
JMESPath query string to filter and format command output.
DESCRIPTION
The az-advisor command is a component of the Azure Command-Line Interface (Azure CLI) that facilitates programmatic interaction with Azure Advisor.
Azure Advisor is a personalized cloud consultant that helps optimize Azure deployments by providing actionable recommendations across five categories: Cost, Security, Reliability, Operational Excellence, and Performance. It analyzes your resource configuration and usage telemetry.
The az-advisor command allows users to list, show details of, disable, enable, and update the status of these recommendations directly from the command line. It also provides functionality to manage Advisor's configuration settings, such as thresholds for certain recommendation types. This capability is essential for automating cloud governance, integrating Advisor insights into scripts, and managing Azure resources efficiently without needing the Azure portal.
CAVEATS
The az-advisor command is part of the Azure CLI and is not a standalone Linux utility. It requires the Azure CLI to be installed and an authenticated Azure account to function. Recommendations are dynamically generated by Azure Advisor and require active Azure resources to be effective. The availability and content of recommendations depend on your Azure resource usage and configuration.
HISTORY
Azure Advisor was introduced as a service to help users optimize their cloud deployments by providing proactive, actionable, and personalized recommendations. As the Azure CLI evolved to provide comprehensive management capabilities, the az-advisor command was integrated to allow programmatic access to these recommendations. This integration enables automation, facilitates cloud governance by integrating Advisor insights into scripts, and supports efficient resource management within CI/CD pipelines and custom automation solutions.