Skip to content

Commit 97153a0

Browse files
committed
Adding second example
1 parent 3ef4537 commit 97153a0

File tree

1 file changed

+48
-39
lines changed

1 file changed

+48
-39
lines changed

articles/azure-monitor/logs/logs-table-plans.md

Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ ms.date: 07/04/2024
1414

1515
You can use one Log Analytics workspace to store any type of log required for any purpose. For example:
1616

17-
- High-volume, verbose data that requires **cheap long-term storage for audit and compliance**
18-
- App and resource data for **troubleshooting** by developers
19-
- Key event and performance data for scaling and alerting to ensure ongoing **operational excellence and security**
20-
- Aggregated long-term data trends for **advanced analytics and machine learning**
17+
* High-volume, verbose data that requires **cheap long-term storage for audit and compliance**
18+
* App and resource data for **troubleshooting** by developers
19+
* Key event and performance data for scaling and alerting to ensure ongoing **operational excellence and security**
20+
* Aggregated long-term data trends for **advanced analytics and machine learning**
2121

2222
Table plans let you manage data costs based on how often you use the data in a table and the type of analysis you need the data for. This article explains and how to set a table's plan.
2323

@@ -39,8 +39,9 @@ All tables support the Analytics plan and all DCR-based custom tables and [some
3939
When you change a table's plan from Analytics to Basic, Azure monitor treats any data that's older than 30 days as long-term retention data based on the total retention period set for the table. In other words, the total retention period of the table remains unchanged, unless you explicitly [modify the long-term retention period](../logs/data-retention-configure.md).
4040

4141
> [!NOTE]
42-
> You can switch a table's plan once a week.
43-
# [Portal](#tab/portal-1)
42+
> You can switch a table's plan once a week.
43+
44+
### [Portal](#tab/portal-1)
4445

4546
Analytics is the default table plan of all tables you create in the portal. You can switch between the Analytics and Basic plans, as described in this section.
4647

@@ -62,7 +63,7 @@ To switch a table's plan in the Azure portal:
6263

6364
1. Select **Save**.
6465

65-
# [API](#tab/api-1)
66+
### [API](#tab/api-1)
6667

6768
To configure a table for Basic logs or Analytics logs, call the [Tables - Update API](/rest/api/loganalytics/tables/create-or-update):
6869

@@ -87,29 +88,29 @@ Container Insights uses `ContainerLog` by default. To switch to using `Container
8788

8889
**Sample request**
8990

90-
```http
91-
PATCH https://management.azure.com/subscriptions/ContosoSID/resourcegroups/ContosoRG/providers/Microsoft.OperationalInsights/workspaces/ContosoWorkspace/tables/ContainerLogV2?api-version=2021-12-01-preview
92-
```
93-
94-
Use this request body to change to Basic logs:
95-
96-
```http
97-
{
98-
"properties": {
99-
"plan": "Basic"
91+
```http
92+
PATCH https://management.azure.com/subscriptions/ContosoSID/resourcegroups/ContosoRG/providers/Microsoft.OperationalInsights/workspaces/ContosoWorkspace/tables/ContainerLogV2?api-version=2021-12-01-preview
93+
```
94+
95+
Use this request body to change to Basic logs:
96+
97+
```http
98+
{
99+
"properties": {
100+
"plan": "Basic"
101+
}
100102
}
101-
}
102-
```
103-
104-
Use this request body to change to Analytics Logs:
105-
106-
```http
107-
{
108-
"properties": {
109-
"plan": "Analytics"
103+
```
104+
105+
Use this request body to change to Analytics Logs:
106+
107+
```http
108+
{
109+
"properties": {
110+
"plan": "Analytics"
111+
}
110112
}
111-
}
112-
```
113+
```
113114

114115
**Sample response**
115116

@@ -132,42 +133,50 @@ Status code: 200
132133
}
133134
```
134135

135-
# [CLI](#tab/cli-1)
136+
### [CLI](#tab/cli-1)
136137

137138
To configure a table for Basic logs or Analytics logs, run the [az monitor log-analytics workspace table update](/cli/azure/monitor/log-analytics/workspace/table#az-monitor-log-analytics-workspace-table-update) command and set the `--plan` parameter to `Basic` or `Analytics`.
138139

139-
For example:
140+
#### Examples
140141

141-
- To set Basic logs:
142+
* To set Basic logs:
142143

143144
```azurecli
144145
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name ContainerLogV2 --plan Basic
145146
```
146147
147-
- To set Analytics Logs:
148+
* To set Analytics Logs:
148149
149150
```azurecli
150151
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name ContainerLogV2 --plan Analytics
151152
```
152153
153-
# [PowerShell](#tab/azure-powershell)
154+
### [PowerShell](#tab/azure-powershell)
154155
155156
To configure a table's plan, use the [Update-AzOperationalInsightsTable](/powershell/module/az.operationalinsights/Update-AzOperationalInsightsTable) cmdlet:
156157
157158
```powershell
158159
Update-AzOperationalInsightsTable -ResourceGroupName RG-NAME -WorkspaceName WORKSPACE-NAME -TableName TABLE-NAME -Plan Basic|Analytics
159160
```
160161

161-
For example:
162+
#### Examples
162163

163-
```powershell
164-
Update-AzOperationalInsightsTable -ResourceGroupName ContosoRG -WorkspaceName ContosoWorkspace -TableName ContainerLogV2 -Plan Basic
165-
```
164+
* To set Basic logs:
165+
166+
```powershell
167+
Update-AzOperationalInsightsTable -ResourceGroupName ContosoRG -WorkspaceName ContosoWorkspace -TableName ContainerLogV2 -Plan Basic
168+
```
169+
170+
* To set Analytics Logs:
171+
172+
```powershell
173+
Update-AzOperationalInsightsTable -ResourceGroupName ContosoRG -WorkspaceName ContosoWorkspace -TableName ContainerLogV2 -Plan Analytics
174+
```
166175
167176
---
168177
169178
## Related content
170179
171-
- [Manage data retention](../logs/data-retention-configure.md).
172-
- [Tables that support the Basic table plan in Azure Monitor Logs](basic-logs-azure-tables.md).
180+
* [Manage data retention](../logs/data-retention-configure.md).
181+
* [Tables that support the Basic table plan in Azure Monitor Logs](basic-logs-azure-tables.md).
173182

0 commit comments

Comments
 (0)