-
-
Notifications
You must be signed in to change notification settings - Fork 16
Inferred metrics
Azure Cost Estimator will automatically infer some metrics based on the provided resources configuration. Those additional calculation may be related to expected usage, free tiers for resources or implicit metrics which are not directly defined. See below for detailed information.
While Log Analytics supports Microsoft_OperationalInsights_workspaces_Paug_Data_Ingestion usage pattern in ACE, you can achieve more granular usage calculation if you leverage dailyQuotaGb parameter:
resource la 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
name: 'infer-la-cost'
location: rgLocation
properties: {
sku: {
name: 'PerGB2018'
}
workspaceCapping: {
dailyQuotaGb: 5
}
}
}
If dailyQuotaGb is defined, it overrides any value defined by Microsoft_OperationalInsights_workspaces_Paug_Data_Ingestion pattern.
As Microsoft_ContainerRegistry_registries_Task_vCPU_Duration first 100 minutes are free, when usage pattern for this metric is used, it'll incorporate the free tier. Thus anytime you define custom value for Microsoft_ContainerRegistry_registries_Task_vCPU_Duration, ACE will report no cost for it until you define more than 100 minutes of its use.
When AKS is defined in your template, ACE will calculate its cost based not only on the AKS SKU selected, but also infer cost based on the agent pools. For example - let's assume you're creating a small AKS cluster based on Standard_DS3_v2 VMs. The result calculation will include cost of such an agent pool:
[Create] aks-priv
\--- Type: Microsoft.ContainerService/managedClusters
\--- Location: EU West
\--- Total cost: 595.68 USD
\--- Delta: +595.68 USD
Aggregated metrics:
-> DS3 v2 [595.6800000000001 USD]
Used metrics:
-> DS3 v2 | Virtual Machines DSv2 Series | DS3 v2 | 0.272 for 1 Hour
If you define virtualNetworkPeerings property when configuring Virtual Network, ACE will try to infer cost by checking how many peerings are actually defined. As peerings are charged based on a set of specific parameters (inbound / outbound transfer, inter / intra region, zone of a region), you may need to use Microsoft_Network_virtualNetworks_Inbound_data_transfer and Microsoft_Network_virtualNetworks_Outbound_data_transfer usage patterns to adjust estimation.
Currently ACE supports intra-region peerings only.
When you define Microsoft.Insights/diagnosticSettings resources in your template, ACE will try to infer cost based on one the following fields:
workspaceIdstorageAccountIdeventHubName
If those are defined, ACE will calculate basic cost with the following assumptions:
- Storage Account used for Diagnostic Settings is created as
StorageV2account withStandard_LRStier and replication - Event Hub Namespace used for collecting logs is deployed with
Basictier
As estimation is performed using artificial resource (i.e. ACE is not querying existing resources), inferring metrics for them is not supported. However, you can still use usage patterns for refining calculation.
Note that usage patterns defined in your template will be automatically applied for inferred Diagnostic Settings cost as artificial resources still generate correct metrics.
When defining priority parameter of your virtual machine, ACE will infer its cost if value of that parameter differs from Regular. This applies to Low Priority / Spot VMs, which are calculated differently than "standard" machines.
ACE will also infer OS disk type and size depending on default Azure values. Inferring OS disk works only if disk is not defined in the template - otherwise, all the configuration is based on defined values instead.