Skip to content

Commit 4e77e90

Browse files
Update data-collection-text-log.md
1 parent fbd3841 commit 4e77e90

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

articles/azure-monitor/agents/data-collection-text-log.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ To complete this procedure, you need:
2525

2626
- [Permissions to create Data Collection Rule objects](../essentials/data-collection-rule-create-edit.md#permissions) in the workspace.
2727

28+
- JSON text must be contained in a single row for proper ingestion. The JSON body (file) format is not supported.
29+
2830
- A Virtual Machine, Virtual Machine Scale Set, Arc-enabled server on-premises or Azure Monitoring Agent on a Windows on-premises client that writes logs to a text or JSON file.
2931

3032
Text and JSON file requirements and best practices:
@@ -183,7 +185,7 @@ To create the data collection rule in the Azure portal:
183185
"type": "Microsoft.Insights/dataCollectionRules",
184186
"name": "dataCollectionRuleName",
185187
"location": "location",
186-
"apiVersion": "2021-09-01-preview",
188+
"apiVersion": "2022-06-01",
187189
"properties": {
188190
"dataCollectionEndpointId": "endpointResourceId",
189191
"streamDeclarations": {
@@ -266,7 +268,7 @@ To create the data collection rule in the Azure portal:
266268
"type": "Microsoft.Insights/dataCollectionRules",
267269
"name": "dataCollectionRuleName",
268270
"location": `location` ,
269-
"apiVersion": "2021-09-01-preview",
271+
"apiVersion": "2022-06-01",
270272
"properties": {
271273
"dataCollectionEndpointId": "endpointResourceId" ,
272274
"streamDeclarations": {
@@ -363,6 +365,10 @@ To create the data collection rule in the Azure portal:
363365

364366
- `transformKql`: Specifies a [transformation](../logs/../essentials//data-collection-transformations.md) to apply to the incoming data before it's sent to the workspace or or leave as **source** if you don't need to transform the collected data.
365367

368+
> [!NOTE]
369+
> JSON text must be contained on a single line. For example {"Element":"Gold","Symbol":"Au","NobleMetal":true,"AtomicNumber":79,"MeltingPointC":1064.18}. To transfom the data into a table with columns TimeGenerated, Element, Symbol, NobleMetal, AtomicNumber and Melting point use this transform: "transformKql": "source|extend d=todynamic(RawData)|project TimeGenerated, Element=tostring(d.Element), Symbol=tostring(d.Symbol), NobleMetal=tostring(d.NobleMetal), AtomicNumber=tostring(d.AtommicNumber), MeltingPointC=tostring(d.MeltingPointC)
370+
371+
366372

367373
See [Structure of a data collection rule in Azure Monitor](../essentials/data-collection-rule-structure.md) if you want to modify the data collection rule.
368374

@@ -378,7 +384,7 @@ To create the data collection rule in the Azure portal:
378384

379385
:::image type="content" source="media/data-collection-text-log/data-collection-rule-details.png" lightbox="media/data-collection-text-log/data-collection-rule-details.png" alt-text="Screenshot that shows the Overview pane in the portal with data collection rule details.":::
380386

381-
1. Change the API version to **2021-09-01-preview**.
387+
1. Change the API version to **2022-06-01**.
382388

383389
:::image type="content" source="media/data-collection-text-log/data-collection-rule-json-view.png" lightbox="media/data-collection-text-log/data-collection-rule-json-view.png" alt-text="Screenshot that shows JSON view for data collection rule.":::
384390

0 commit comments

Comments
 (0)