Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

When I request cost recommendations on VM right-sizing using get-azadvisorrecommendation no savings values are returned #16024

Open andymcadam opened 2 years ago

andymcadam commented 2 years ago

When using the Azure portal, VM Right-sizing advice shows the potential savings for each recommendation. However, requesting the same data using the Powershell cmdlet doesn't show annual savings potential amounts. there is the extendedProperties object, but that only shows the machine resize details, not the cost savings.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ghost commented 2 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mojayara, @Prasanna-Padmanabhan.

Issue Details
When using the Azure portal, VM Right-sizing advice shows the potential savings for each recommendation. However, requesting the same data using the Powershell cmdlet doesn't show annual savings potential amounts. there is the extendedProperties object, but that only shows the machine resize details, not the cost savings. --- #### Document Details ⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.* * ID: 63717818-fb94-62bf-b968-79cc2aa2d3a9 * Version Independent ID: 4676b8b1-2ef3-762c-c8c1-7a882428d54e * Content: [Get-AzAdvisorRecommendation (Az.Advisor)](https://docs.microsoft.com/en-us/powershell/module/az.advisor/get-azadvisorrecommendation?view=azps-6.4.0) * Content Source: [src/Advisor/Advisor/help/Get-AzAdvisorRecommendation.md](https://github.com/Azure/azure-powershell/blob/main/src/Advisor/Advisor/help/Get-AzAdvisorRecommendation.md) * Service: **azure-powershell** * GitHub Login: @dcaro * Microsoft Alias: **dcaro**
Author: andymcadam
Assignees: -
Labels: `Advisor`, `Service Attention`, `question`, `customer-reported`, `needs-triage`
Milestone: -
jportugal0 commented 2 years ago

Hi @andymcadam, Thanks for your feedback, the Advisor team is actively working with Billing and Cost Management team on a solution to be able to provide Cost savings on all of our API's which would then reflect in all our other tools. We will make an announcement as soon as the data is available. Since you are using the CLI I assume the portal might not be a solution for your use case, but that's the only alternative available at the moment to fetch cost until the aforementioned solution is available.

andymcadam commented 2 years ago

Hi @jportugal0 I'm happy to use REST from powershell if that can provide the data. But if the portal is doing some calculations in the background presently to get the cost data shown, then I'd need to replicate that in code by downloading price sheets and comparing with the SKUs shown in the advisor recommendation to make the same calculation myself.

navba-MSFT commented 2 years ago

@andymcadam Apologies for the late reply. While I called the REST API for the Advisor Recommendations using the api-version=2020-01-01, it worked fine. But I couldn't see the cost savings recommendations for VM. So I will check and get back to you with more details.

In the meantime, Could you please run this Azure CLI command using the most recent version of the CLI and test the behavior. Awaiting your reply.

@mojayara @Prasanna-Padmanabhan Could you please update us on when the powershell command would be fixed to include the VM Cost recommendations ? Awaiting your reply.

navba-MSFT commented 2 years ago

@andymcadam The product owners are aware of this issue and they plan to work on it. There is no ETA for this feature yet. We will update this thread once we have more details.