You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/agents/data-collection-text-log.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,8 @@ To complete this procedure, you need:
25
25
26
26
-[Permissions to create Data Collection Rule objects](../essentials/data-collection-rule-create-edit.md#permissions) in the workspace.
27
27
28
+
- JSON text must be contained in a single row for proper ingestion. The JSON body (file) format is not supported.
29
+
28
30
- 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.
29
31
30
32
Text and JSON file requirements and best practices:
@@ -183,7 +185,7 @@ To create the data collection rule in the Azure portal:
183
185
"type": "Microsoft.Insights/dataCollectionRules",
184
186
"name": "dataCollectionRuleName",
185
187
"location": "location",
186
-
"apiVersion": "2021-09-01-preview",
188
+
"apiVersion": "2022-06-01",
187
189
"properties": {
188
190
"dataCollectionEndpointId": "endpointResourceId",
189
191
"streamDeclarations": {
@@ -266,7 +268,7 @@ To create the data collection rule in the Azure portal:
@@ -363,6 +365,10 @@ To create the data collection rule in the Azure portal:
363
365
364
366
- `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.
365
367
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
+
366
372
367
373
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.
368
374
@@ -378,7 +384,7 @@ To create the data collection rule in the Azure portal:
378
384
379
385
:::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.":::
380
386
381
-
1. Change the API version to **2021-09-01-preview**.
387
+
1. Change the API version to **2022-06-01**.
382
388
383
389
:::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.":::
0 commit comments