Skip to content

Commit 4828451

Browse files
committed
Script updates and fixes
1 parent ff976ac commit 4828451

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

articles/azure-monitor/logs/tutorial-logs-ingestion-api.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,14 @@ Use the **Tables - Update** API to create the table with the following PowerShel
9090
"description": "Additional message properties"
9191
},
9292
{
93-
"name": "ExtendedColumn",
93+
"name": "CounterName",
9494
"type": "string",
95-
"description": "An additional column extended at ingestion time"
95+
"description": "Name of the counter"
96+
},
97+
{
98+
"name": "CounterName",
99+
"type": "string",
100+
"description": "Value collected for the counter"
96101
}
97102
]
98103
}
@@ -214,12 +219,6 @@ The [DCR](../essentials/data-collection-rule-overview.md) defines the schema of
214219
},
215220
"location": {
216221
"type": "string",
217-
"defaultValue": "westus2",
218-
"allowedValues": [
219-
"westus2",
220-
"eastus2",
221-
"eastus2euap"
222-
],
223222
"metadata": {
224223
"description": "Specifies the location in which to create the Data Collection Rule."
225224
}
@@ -279,7 +278,7 @@ The [DCR](../essentials/data-collection-rule-overview.md) defines the schema of
279278
"destinations": [
280279
"clv2ws1"
281280
],
282-
"transformKql": "source | extend jsonContext = parse_json(AdditionalContext) | project TimeGenerated = Time, Computer, AdditionalContext = jsonContext, ExtendedColumn=tostring(jsonContext.CounterName)",
281+
"transformKql": "source | extend jsonContext = parse_json(AdditionalContext) | project TimeGenerated = Time, Computer, AdditionalContext = jsonContext, CounterName=tostring(jsonContext.CounterName), CounterValue=jsonContext.CounterValue",
283282
"outputStream": "Custom-MyTable_CL"
284283
}
285284
]
@@ -405,7 +404,7 @@ The following PowerShell code sends data to the endpoint by using HTTP REST fund
405404
##################
406405
$body = $staticData;
407406
$headers = @{"Authorization"="Bearer $bearerToken";"Content-Type"="application/json"};
408-
$uri = "$dceEndpoint/dataCollectionRules/$dcrImmutableId/streams/$streamName?api-version=2021-11-01-preview"
407+
$uri = "$dceEndpoint/dataCollectionRules/$dcrImmutableId/streams/$($streamName)?api-version=2021-11-01-preview"
409408
410409
$uploadResponse = Invoke-RestMethod -Uri $uri -Method "Post" -Body $body -Headers $headers
411410
```

0 commit comments

Comments
 (0)