[Question]: Advisor tab results
Have a question about the project? Please write it down under! I'm trying to build a script to compare the results in the Advisor tab generated by ARI on a monthly basis. During debugging I noticed that the advisor report has more entries than the advisor page in the Azure web portal. Additionally, some rows in the advisor had identical costs, Digging in, I noticed that the advisor tab is displaying cost recommendations on the same resource, but over a different lookback period.
StartARIGraphExtraction:121
Search-AzGraph -Query "advisorresources | where properties.impact in~ ('Medium','High') | order by id asc" -Subscription $SubscriptionIDs
Should the Advisor tab either display the lookback period that the recommendation is for, or have a configurable value for what the lookback period should be?
What version are you using? 3.6.8
Any other context information Any additional information that might be helpful to answer your question
Hello @dchuivalard
That is an excellent point, thanks for highlight that.
I'm adding the "term", "qty" and "lookbackperiod" in the advisor tab. Should be included in the release 3.6.9
Great, thanks for the update!
Might be worth including some extra filters for suppressed recommendations as well. Have a look at how the Cost Optimization workbook does it:
advisorresources | where type =~ 'microsoft.advisor/recommendations' | where resourceGroup in ({ResourceGroup}) | where properties.category == 'Cost' and properties.lastUpdated >= ago(1d) | extend AffectedResource=tostring(properties.resourceMetadata.resourceId), Category=tostring(properties.category), SubCategory=tostring(properties.impactedField), Impact=tostring(properties.impact),subscriptionId,Recommendation=tostring(properties.shortDescription.problem), id, stableId = name, recommendationTypeId = tostring(properties.recommendationTypeId), maxCpuP95 = properties.extendedProperties.MaxCpuP95,resourceGroup=strcat('/subscriptions/',subscriptionId,'/resourceGroups/',resourceGroup) | join kind = leftouter (advisorresources | where type=~'microsoft.advisor/suppressions' | extend tokens = split(id, '/') | extend stableId = iff(array_length(tokens) > 3, tokens[(array_length(tokens)-3)], '') | extend expirationTimeStamp = todatetime(iff(strcmp(tostring(properties.ttl), '-1') == 0, '9999-12-31', properties.expirationTimeStamp)) | where expirationTimeStamp > now() | project stableId, expirationTimeStamp) on stableId | where isempty(expirationTimeStamp) | project AffectedResource=tostring(properties.resourceMetadata.resourceId), Category=tostring(properties.category), SubCategory=tostring(properties.impactedField), Recommendation=tostring(properties.shortDescription.problem), Impact=tostring(properties.impact),resourceGroup,subscriptionId, id, stableId = name, recommendationTypeId = tostring(properties.recommendationTypeId), maxCpuP95 = properties.extendedProperties.MaxCpuP95 | join kind = leftouter (advisorresources | where type =~ 'microsoft.advisor/configurations' | where isempty(resourceGroup) == true | project subscriptionId, excludeRecomm = properties.exclude, lowCpuThreshold = properties.lowCpuThreshold, AffectedResource=tostring(properties.resourceMetadata.resourceId),Impact=tostring(properties.impact),resourceGroup,AdditionaInfo=properties.extendedProperties,Recommendation=tostring(properties.shortDescription.problem)) on subscriptionId | extend isActive1 = iff(isnull(excludeRecomm), true, tobool(excludeRecomm) == false) | extend isActive2 = iff(recommendationTypeId == 'e10b1381-5f0a-47ff-8c7b-37bd13d7c974', iff((isnotempty(lowCpuThreshold) and isnotempty(maxCpuP95)), toint(maxCpuP95) < toint(lowCpuThreshold), iff((isempty(maxCpuP95) or toint(maxCpuP95) < 5), true, false)), true) | where isActive1 == true and isActive2 == true | join kind = leftouter (advisorresources | where type =~ 'microsoft.advisor/configurations' | where isnotempty(resourceGroup) == true | project subscriptionId, resourceGroup, excludeProperty = properties.exclude) on subscriptionId, resourceGroup | extend isActive3 = iff(isnull(excludeProperty), true, tobool(excludeProperty) == false) | where isActive3 == true | where Category == 'Cost' | where SubCategory has "Microsoft.Compute" or SubCategory has "Container" or SubCategory has "Web" | where SubCategory !has "Microsoft.Compute/disks" | project-away subscriptionId1, subscriptionId2, AffectedResource1, isActive2, isActive3, Impact1, Recommendation1, resourceGroup1, resourceGroup2
@dchuivalard
Just pushed version 3.6.9, can you test it and tell me if the new Advisor tab works?
@arthurclares Thanks for highlighting it, but we also include advisor recommendation for other things, like Reliability, Operational Excellence, and Security. We have to consider that when applying filters to the resources. Let's see how the improvements on version 3.6.9 goes and then we evaluate further improvements in version 3.6.10
@Claudio-Merola I see the updated fields, thanks! On a related note, I noticed that Savings is set as a formula in line 71 of this file: https://github.com/microsoft/ARI/blob/main/Modules/Public/PublicFunctions/Jobs/Start-ARIAdvisoryJob.ps1
but the newly added numerical fields are just set as values. Is there a reason for this? It makes importing the file using Import-Excel a bit tricky
This Issue is stale and may be automatically close soon.