Setting a table's log data plan to Basic Logs lets you save on the cost of storing high-volume verbose logs you use for debugging, troubleshooting and auditing, but not for analytics and alerts. This article describes how to configure Basic Logs for a particular table in your Log Analytics workspace.
Important
You can switch a table's plan once a week. The Basic Logs feature is not available for workspaces in legacy pricing tiers.
Which tables support Basic Logs?
By default, all tables in your Log Analytics are Analytics tables, and available for query and alerts.
You can currently configure the following tables for Basic Logs:
Use the Bearer token for authentication. Read more about using Bearer tokens.
Request body
Name
Type
Description
properties.plan
string
The table plan. Possible values are Analytics and Basic.
Example
This example configures the ContainerLogV2 table for Basic Logs.
Container Insights uses ContainerLog by default, to switch to using ContainerLogV2, please follow these instructions before attempting to convert the table to Basic Logs.
To check table configuration in the Azure portal, you can open the table configuration screen, as described in Set table configuration.
Alternatively:
From the Azure Monitor menu, select Logs and select your workspace for the scope. See Log Analytics tutorial for a walkthrough.
Open the Tables tab, which lists all tables in the workspace.
Basic Logs tables have a unique icon:
You can also hover over a table name for the table information view, which indicates whether the table is configured as Basic Logs:
To check the configuration of a table, call the Tables - Get API:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}?api-version=2021-12-01-preview
Response Body
Name
Type
Description
properties.plan
string
The table plan. Either "Analytics" or "Basic".
properties.retentionInDays
integer
The table's data retention in days. In Basic Logs, the value is 8 days, fixed. In Analytics Logs, between 7 and 730.
properties.totalRetentionInDays
integer
The table's data retention including Archive period
properties.archiveRetentionInDays
integer
The table's archive period (read-only, calculated).
properties.lastPlanModifiedDate
String
Last time when plan was set for this table. Null if no change was ever done from the default settings (read-only)
Sample Request
GET https://management.azure.com/subscriptions/ContosoSID/resourcegroups/ContosoRG/providers/Microsoft.OperationalInsights/workspaces/ContosoWorkspace/tables/ContainerLogV2?api-version=2021-12-01-preview
Basic Logs tables retain data for eight days. When you change an existing table's plan to Basic Logs, Azure archives data that is more than eight days old but still within the table's original retention period.