AzureAzure Monitor LogsManagement

azurerm_log_analytics_solution cost estimation

A management solution (such as ContainerInsights or VMInsights) enabled on a Log Analytics workspace. The solution is free to add. Cost lives in the data it causes the workspace to ingest and retain.

The azurerm_log_analytics_solution resource enables a packaged management solution on a Log Analytics workspace, for example ContainerInsights, VMInsights, SecurityInsights, or Updates. The solution itself is free: enabling it adds queries, views, and data-collection configuration to the workspace but carries no per-resource charge. What it does is turn on collection of a particular class of telemetry, and that telemetry is billed by the parent azurerm_log_analytics_workspace when it lands.

Log Analytics bills ingestion and retention. Analytics logs ingest at about $2.30/GB on pay-as-you-go, while the cheaper Basic logs tier is about $0.65/GB for high-volume, low-query data. Retention is free for the first 31 days, then about $0.10/GB-month for data kept longer. For predictable heavy volume, commitment tiers discount ingestion (for example a 100 GB/day tier lowers the effective per-GB rate). The key point is that the solution is the tap and the workspace is the meter: a solution that collects verbose telemetry can drive a large ingestion bill without ever appearing as a cost itself.

ContainerInsights is the classic example. Enabling it on an AKS cluster collects container stdout/stderr, inventory, and performance metrics, which on a busy cluster can be many GB per day. At $2.30/GB that becomes a real monthly number, and it is easy to attribute the cost to the workspace and never realize a free solution resource is what opened the firehose.

The cost-adjacent gotcha is verbose or duplicate collection. Solutions often default to collecting more than you query. Trim what is collected (for example limit ContainerInsights to the namespaces you care about, or route noisy tables to the Basic logs tier), and set table-level retention so long-lived but rarely queried data is not billed at the full analytics rate. Note also that classic Log Analytics solutions are being phased out in favor of workspace-native features, but where they still exist they remain free while the data they collect is not.

c3x flags azurerm_log_analytics_solution as free and attributes ingestion and retention cost to the workspace the solution feeds.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "azurerm_log_analytics_workspace" "main" {
  name                = "central-logs"
  location            = "eastus"
  resource_group_name = azurerm_resource_group.main.name
  sku                 = "PerGB2018"
  retention_in_days   = 30
}

resource "azurerm_log_analytics_solution" "container_insights" {
  solution_name        = "ContainerInsights"
  location             = "eastus"
  resource_group_name  = azurerm_resource_group.main.name
  workspace_resource_id = azurerm_log_analytics_workspace.main.id
  workspace_name        = azurerm_log_analytics_workspace.main.name

  plan {
    publisher = "Microsoft"
    product   = "OMSGallery/ContainerInsights"
  }
}

Pricing dimensions

What you actually pay for when you provision azurerm_log_analytics_solution.

DimensionUnitWhat's being charged
Log Analytics solutionfreeEnabling the solution adds queries and collection config with no per-resource charge.
$0 (free)
Analytics log ingestionper GBData collected into the workspace on the standard analytics tier, pay-as-you-go.
about $2.30/GB
Basic log ingestionper GBCheaper tier for high-volume, low-query tables. Query and some features are limited.
about $0.65/GB
Retention (beyond 31 days)per GB-monthThe first 31 days of retention are free. Longer retention is billed per GB-month.
about $0.10/GB-month

Optimization tips

Common ways to reduce azurerm_log_analytics_solution cost without changing the workload.

Collect only what you query

Often 30 to 60% of workspace ingestion

Solutions often default to verbose collection. Scope ContainerInsights to the namespaces that matter and disable metric or log streams you never look at. Ingestion at $2.30/GB is the main lever, and it is set by collection volume.

Route noisy tables to the Basic logs tier

Up to 70% on eligible tables

High-volume, rarely queried tables can move to Basic logs at about $0.65/GB instead of $2.30/GB. Reserve the analytics tier for data you actively alert and query on.

Set table-level retention

Retention beyond 31 days bills per GB-month. Configure retention per table so audit data you must keep is separated from operational logs that can expire quickly.

Use commitment tiers at steady high volume

15 to 30% at high sustained volume

If the workspace reliably ingests 100 GB/day or more, a commitment tier lowers the effective per-GB rate versus pay-as-you-go. Match the tier to your sustained volume.

FAQ

Does enabling a Log Analytics solution cost anything?

No. The solution resource is free. It turns on collection and adds queries and views. The cost appears on the workspace as ingestion and retention for the telemetry the solution collects.

Why did my workspace bill jump after enabling ContainerInsights?

ContainerInsights collects container logs, inventory, and performance data, which on a busy cluster can be several GB per day. At about $2.30/GB that is a real cost even though the solution itself is free. Scope collection to reduce it.

How can I cut Log Analytics ingestion cost?

Collect less (scope solutions to what you actually monitor), move high-volume low-query tables to the Basic logs tier at about $0.65/GB, set per-table retention, and use a commitment tier if you ingest a steady 100 GB/day or more.

Are Log Analytics solutions being retired?

Classic solutions are gradually being replaced by workspace-native features and Azure Monitor experiences. Where a solution resource still applies it remains free, and the ingestion and retention it drives on the workspace remain the billed part.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including azurerm_log_analytics_solution.