Skip to content

Commit 568e5bf

Browse files
authored
Merge pull request #191825 from guywi-ms/guywild-ms-basic-logs-updates
Updates to Basic Log docs
2 parents 4da31d5 + b20f997 commit 568e5bf

File tree

6 files changed

+32
-36
lines changed

6 files changed

+32
-36
lines changed

articles/azure-monitor/logs/azure-cli-log-analytics-workspace-sample.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ You can delete [Custom Log](custom-logs-overview.md), [Search Results](search-jo
6060
To delete a table, run the [az monitor log-analytics workspace table delete](/cli/azure/monitor/log-analytics/workspace/table#az-monitor-log-analytics-workspace-data-export-delete) command:
6161

6262
```azurecli
63-
az monitor log-analytics workspace table delete –subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
64-
--name MySearchTable_SRCH
63+
az monitor log-analytics workspace table delete –subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name MySearchTable_SRCH
6564
```
6665

6766
## Export data from selected tables

articles/azure-monitor/logs/basic-logs-configure.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,13 @@ For example:
103103
- To set Basic Logs:
104104

105105
```azurecli
106-
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
107-
--name ContainerLog --plan Basic
106+
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name ContainerLog --plan Basic
108107
```
109108
110109
- To set Analytics Logs:
111110
112111
```azurecli
113-
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
114-
--name ContainerLog --plan Analytics
112+
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name ContainerLog --plan Analytics
115113
```
116114
117115
---
@@ -183,8 +181,7 @@ To check the configuration of a table, run the [az monitor log-analytics workspa
183181
For example:
184182

185183
```azurecli
186-
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
187-
--name Syslog --output table \
184+
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name Syslog --output table
188185
```
189186

190187
---

articles/azure-monitor/logs/basic-logs-query.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ ms.date: 01/27/2022
77
---
88

99
# Query Basic Logs in Azure Monitor (Preview)
10-
Basic Logs reduce the cost of high-volume verbose logs you don’t need for analytics and alerts. Basic Logs have reduced charges for ingestion and limitations on log queries and other Azure Monitor features. This article describes how to query data from tables configured for Basic Logs in the Azure portal and using the Log Analytics REST API.
10+
Basic Logs tables reduce the cost of ingesting high-volume verbose logs and let you query the data they store using a limited set of log queries. This article explains how to query data from Basic Logs tables.
11+
12+
For more information, see [Azure log data plans](log-analytics-workspace-overview.md#log-data-plans-preview) and [Configure a table for Basic Logs](basic-logs-configure.md).
13+
1114

1215
> [!NOTE]
1316
> Other tools that use the Azure API for querying - for example, Grafana and Power BI - cannot access Basic Logs.
1417
15-
## Limits
18+
## Limitations
1619
Queries with Basic Logs are subject to the following limitations:
1720
### KQL language limits
1821
Log queries against Basic Logs are optimized for simple data retrieval using a subset of KQL language, including the following operators:
@@ -33,38 +36,43 @@ You can use all functions and binary operators within these operators.
3336
Specify the time range in the query header in Log Analytics or in the API call. You can't specify the time range in the query body using a **where** statement.
3437

3538
### Query context
36-
Queries with Basic Logs must use a workspace for the scope. You can't run queries using another resource for the scope. For more details, see [Log query scope and time range in Azure Monitor Log Analytics](scope.md).
39+
Queries with Basic Logs must use a workspace for the scope. You can't run queries using another resource for the scope. For more information, see [Log query scope and time range in Azure Monitor Log Analytics](scope.md).
3740

3841
### Concurrent queries
3942
You can run two concurrent queries per user.
4043

4144
### Purge
42-
You cannot [purge personal data](personal-data-mgmt.md#how-to-export-and-delete-private-data) from Basic Logs tables.
45+
You can’t [purge personal data](personal-data-mgmt.md#how-to-export-and-delete-private-data) from Basic Logs tables.
4346

4447

45-
## Run a query from the Azure portal
48+
## Run a query on a Basic Logs table
4649
Creating a query using Basic Logs is the same as any other query in Log Analytics. See [Get started with Azure Monitor Log Analytics](./log-analytics-tutorial.md) if you aren't familiar with this process.
4750

48-
Open Log Analytics in the Azure portal and open the **Tables** tab. When browsing the list of tables, Basic Logs tables are identified with a unique icon:
51+
# [Portal](#tab/portal-1)
52+
53+
In the Azure portal, select **Monitor** > **Logs** > **Tables**.
54+
55+
In the list of tables, you can identify Basic Logs tables by their unique icon:
4956

5057
![Screenshot of the Basic Logs table icon in the table list.](./media/basic-logs-configure/table-icon.png)
5158

52-
You can also hover over a table name for the table information view. This will specify that the table is configured as Basic Logs:
59+
You can also hover over a table name for the table information view, which will specify that the table is configured as Basic Logs:
5360

5461
![Screenshot of the Basic Logs table indicator in the table details.](./media/basic-logs-configure/table-info.png)
5562

56-
5763
When you add a table to the query, Log Analytics will identify a Basic Logs table and align the authoring experience accordingly. The following example shows when you attempt to use an operator that isn't supported by Basic Logs.
5864

5965
![Screenshot of Query on Basic Logs limitations.](./media/basic-logs-query/query-validator.png)
6066

61-
## Run a query from REST API
67+
# [API](#tab/api-1)
68+
6269
Use **/search** from the [Log Analytics API](api/overview.md) to run a query with Basic Logs using a REST API. This is similar to the [/query](api/request-format.md) API with the following differences:
6370

6471
- The query is subject to the language limitations described above.
6572
- The time span must be specified in the header of the request and not in the query statement.
6673

67-
### Sample Request
74+
**Sample Request**
75+
6876
```http
6977
https://api.loganalytics.io/v1/workspaces/testWS/search?timespan=P1D
7078
```
@@ -77,7 +85,8 @@ https://api.loganalytics.io/v1/workspaces/testWS/search?timespan=P1D
7785
}
7886
```
7987

80-
## Costs
88+
---
89+
## Pricing model
8190
The charge for a query on Basic Logs is based on the amount of data the query scans, not just the amount of data the query returns. For example, a query that scans three days of data in a table that ingests 100 GB each day, would be charged for 300 GB. Calculation is based on chunks of up to one day of data.
8291

8392
For more information, see [Azure Monitor pricing](https://azure.microsoft.com/pricing/details/monitor/).

articles/azure-monitor/logs/data-retention-archive.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,15 @@ To set the retention and archive duration for a table, run the [az monitor log-a
118118
This example sets table's interactive retention to 30 days, and the total retention to two years. This means the archive duration is 23 months:
119119

120120
```azurecli
121-
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
122-
--name AzureMetrics --retention-time 30 --total-retention-time 730
121+
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name AzureMetrics --retention-time 30 --total-retention-time 730
123122
```
124123

125124
To reapply the workspace's default interactive retention value to the table and reset its total retention to 0, run the [az monitor log-analytics workspace table update](/cli/azure/monitor/log-analytics/workspace/table#az-monitor-log-analytics-workspace-table-update) command with the `--retention-time` and `--total-retention-time` parameters set to `-1`.
126125

127126
For example:
128127

129128
```azurecli
130-
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
131-
--name Syslog --retention-time -1 --total-retention-time -1
129+
az monitor log-analytics workspace table update --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name Syslog --retention-time -1 --total-retention-time -1
132130
```
133131

134132
---
@@ -156,8 +154,7 @@ To get the retention policy of a particular table, run the [az monitor log-analy
156154
For example:
157155

158156
```azurecli
159-
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
160-
--name SecurityEvent
157+
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name SecurityEvent
161158
```
162159

163160
---

articles/azure-monitor/logs/restore.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ To restore data from a table, run the [az monitor log-analytics workspace table
8080
For example:
8181

8282
```azurecli
83-
az monitor log-analytics workspace table restore create --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
84-
--name Heartbeat_RST --restore-source-table Heartbeat --start-restore-time "2022-01-01T00:00:00.000Z" --end-restore-time "2022-01-08T00:00:00.000Z" --no-wait
83+
az monitor log-analytics workspace table restore create --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name Heartbeat_RST --restore-source-table Heartbeat --start-restore-time "2022-01-01T00:00:00.000Z" --end-restore-time "2022-01-08T00:00:00.000Z" --no-wait
8584
```
8685

8786
---
@@ -107,8 +106,7 @@ To delete a restore table, run the [az monitor log-analytics workspace table del
107106
For example:
108107

109108
```azurecli
110-
az monitor log-analytics workspace table delete --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
111-
--name Heartbeat_RST
109+
az monitor log-analytics workspace table delete --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name Heartbeat_RST
112110
```
113111

114112
---

articles/azure-monitor/logs/search-jobs.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ To run a search job, run the [az monitor log-analytics workspace table search-jo
9696
For example:
9797

9898
```azurecli
99-
az monitor log-analytics workspace table search-job create --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
100-
--name HeartbeatByIp_SRCH --search-query 'Heartbeat | where ComputerIP has "00.000.00.000"' --limit 1500 \
101-
--start-search-time "2022-01-01T00:00:00.000Z" --end-search-time "2022-01-08T00:00:00.000Z" --no-wait
99+
az monitor log-analytics workspace table search-job create --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name HeartbeatByIp_SRCH --search-query 'Heartbeat | where ComputerIP has "00.000.00.000"' --limit 1500 --start-search-time "2022-01-01T00:00:00.000Z" --end-search-time "2022-01-08T00:00:00.000Z" --no-wait
102100
```
103101

104102
---
@@ -175,8 +173,7 @@ To check the status and details of a search job table, run the [az monitor log-a
175173
For example:
176174

177175
```azurecli
178-
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
179-
--name HeartbeatByIp_SRCH --output table \
176+
az monitor log-analytics workspace table show --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name HeartbeatByIp_SRCH --output table \
180177
```
181178

182179
---
@@ -199,8 +196,7 @@ To delete a search table, run the [az monitor log-analytics workspace table dele
199196
For example:
200197

201198
```azurecli
202-
az monitor log-analytics workspace table delete --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace \
203-
--name HeartbeatByIp_SRCH
199+
az monitor log-analytics workspace table delete --subscription ContosoSID --resource-group ContosoRG --workspace-name ContosoWorkspace --name HeartbeatByIp_SRCH
204200
```
205201

206202
---

0 commit comments

Comments
 (0)