Skip to content

Commit 3cda97d

Browse files
authored
Merge pull request #269323 from bwren/dcr
Combine DCR articles
2 parents d39bc76 + f4ce7df commit 3cda97d

33 files changed

+665
-529
lines changed

.openpublishing.redirection.azure-monitor.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6623,6 +6623,21 @@
66236623
"source_path_from_root": "/articles/azure-monitor/insights/resource-group-insights.md",
66246624
"redirect_url": "/azure/azure-resource-manager/management/resource-group-insights",
66256625
"redirect_document_id": false
6626+
},
6627+
{
6628+
"source_path_from_root": "/articles/azure-monitor/essentials/data-collection-endpoint-sample.md",
6629+
"redirect_url": "/azure/azure-monitor/essentials/data-collection-endpoint-overview#sample-data-collection-endpoint",
6630+
"redirect_document_id": false
6631+
},
6632+
{
6633+
"source_path_from_root": "/articles/azure-monitor/essentials/data-collection.md",
6634+
"redirect_url": "/azure/azure-monitor/essentials/data-collection-rule-overview",
6635+
"redirect_document_id": false
6636+
},
6637+
{
6638+
"source_path_from_root": "/articles/azure-monitor/agents/resource-manager-data-collection-rules.md",
6639+
"redirect_url": "/azure/azure-monitor/essentials/data-collection-rule-create-edit?tabs=arm#manually-create-a-dcr",
6640+
"redirect_document_id": false
66266641
}
66276642
]
66286643
}

articles/azure-monitor/agents/azure-monitor-agent-manage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ You can use Resource Manager templates to install Azure Monitor Agent on Azure v
191191
Get sample templates for installing the agent and creating the association from the following resources:
192192

193193
- [Template to install Azure Monitor agent (Azure and Azure Arc)](../agents/resource-manager-agent.md#azure-monitor-agent)
194-
- [Template to create association with data collection rule](./resource-manager-data-collection-rules.md)
194+
- [Template to create association with data collection rule](../essentials/data-collection-rule-create-edit.md?tabs=arm#manually-create-a-dcr)
195195

196196
Install the templates by using [any deployment method for Resource Manager templates](../../azure-resource-manager/templates/deploy-powershell.md), such as the following commands.
197197

articles/azure-monitor/agents/azure-monitor-agent-transformation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To complete this procedure, you need:
6161
RawData
6262
```
6363
> [!NOTE]
64-
> Information the user should notice even if skimmingQuerying table data in this way doesn't actually modify the data in the table. Azure Monitor applies the transformation in the [data ingestion pipeline](../essentials/data-collection-transformations.md#how-transformations-work) after you [add your transformation query to the data collection rule](#apply-the-transformation-to-your-data-collection-rule).
64+
> Querying table data in this way doesn't actually modify the data in the table. Azure Monitor applies the transformation in the [data ingestion pipeline](../essentials/data-collection-transformations.md) after you [add your transformation query to the data collection rule](#apply-the-transformation-to-your-data-collection-rule).
6565
6666
1. Format the query into a single line and replace the table name in the first line of the query with the word `source`.
6767

articles/azure-monitor/agents/data-collection-rule-azure-monitor-agent.md

Lines changed: 216 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,223 @@ You can define a data collection rule to send data from multiple machines to mul
110110

111111
This capability is enabled as part of the Azure CLI monitor-control-service extension. [View all commands](/cli/azure/monitor/data-collection/rule).
112112

113-
### [Resource Manager template](#tab/arm)
113+
### [ARM](#tab/arm)
114+
115+
#### Create association with Azure VM
116+
117+
The following sample creates an association between an Azure virtual machine and a data collection rule.
118+
119+
120+
##### Template file
121+
122+
```json
123+
{
124+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
125+
"contentVersion": "1.0.0.0",
126+
"parameters": {
127+
"vmName": {
128+
"type": "string",
129+
"metadata": {
130+
"description": "The name of the virtual machine."
131+
}
132+
},
133+
"associationName": {
134+
"type": "string",
135+
"metadata": {
136+
"description": "The name of the association."
137+
}
138+
},
139+
"dataCollectionRuleId": {
140+
"type": "string",
141+
"metadata": {
142+
"description": "The resource ID of the data collection rule."
143+
}
144+
}
145+
},
146+
"resources": [
147+
{
148+
"type": "Microsoft.Insights/dataCollectionRuleAssociations",
149+
"apiVersion": "2021-09-01-preview",
150+
"scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('vmName'))]",
151+
"name": "[parameters('associationName')]",
152+
"properties": {
153+
"description": "Association of data collection rule. Deleting this association will break the data collection for this virtual machine.",
154+
"dataCollectionRuleId": "[parameters('dataCollectionRuleId')]"
155+
}
156+
}
157+
]
158+
}
159+
```
160+
161+
##### Parameter file
162+
163+
```json
164+
{
165+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
166+
"contentVersion": "1.0.0.0",
167+
"parameters": {
168+
"vmName": {
169+
"value": "my-azure-vm"
170+
},
171+
"associationName": {
172+
"value": "my-windows-vm-my-dcr"
173+
},
174+
"dataCollectionRuleId": {
175+
"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/microsoft.insights/datacollectionrules/my-dcr"
176+
}
177+
}
178+
}
179+
```
180+
181+
## Create association with Azure Arc
182+
183+
The following sample creates an association between an Azure Arc-enabled server and a data collection rule.
184+
185+
##### Template file
186+
187+
```json
188+
{
189+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
190+
"contentVersion": "1.0.0.0",
191+
"parameters": {
192+
"vmName": {
193+
"type": "string",
194+
"metadata": {
195+
"description": "The name of the virtual machine."
196+
}
197+
},
198+
"associationName": {
199+
"type": "string",
200+
"metadata": {
201+
"description": "The name of the association."
202+
}
203+
},
204+
"dataCollectionRuleId": {
205+
"type": "string",
206+
"metadata": {
207+
"description": "The resource ID of the data collection rule."
208+
}
209+
}
210+
},
211+
"resources": [
212+
{
213+
"type": "Microsoft.Insights/dataCollectionRuleAssociations",
214+
"apiVersion": "2021-09-01-preview",
215+
"scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('vmName'))]",
216+
"name": "[parameters('associationName')]",
217+
"properties": {
218+
"description": "Association of data collection rule. Deleting this association will break the data collection for this virtual machine.",
219+
"dataCollectionRuleId": "[parameters('dataCollectionRuleId')]"
220+
}
221+
}
222+
]
223+
}
224+
```
225+
226+
### [Bicep](#tab/bicep)
227+
228+
#### Create association with Azure VM
229+
230+
The following sample creates an association between an Azure virtual machine and a data collection rule.
231+
232+
233+
##### Template file
234+
235+
```bicep
236+
@description('The name of the virtual machine.')
237+
param vmName string
238+
239+
@description('The name of the association.')
240+
param associationName string
241+
242+
@description('The resource ID of the data collection rule.')
243+
param dataCollectionRuleId string
244+
245+
resource vm 'Microsoft.Compute/virtualMachines@2021-11-01' existing = {
246+
name: vmName
247+
}
248+
249+
resource association 'Microsoft.Insights/dataCollectionRuleAssociations@2021-09-01-preview' = {
250+
name: associationName
251+
scope: vm
252+
properties: {
253+
description: 'Association of data collection rule. Deleting this association will break the data collection for this virtual machine.'
254+
dataCollectionRuleId: dataCollectionRuleId
255+
}
256+
}
257+
```
258+
259+
##### Parameter file
260+
261+
```json
262+
{
263+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
264+
"contentVersion": "1.0.0.0",
265+
"parameters": {
266+
"vmName": {
267+
"value": "my-azure-vm"
268+
},
269+
"associationName": {
270+
"value": "my-windows-vm-my-dcr"
271+
},
272+
"dataCollectionRuleId": {
273+
"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/microsoft.insights/datacollectionrules/my-dcr"
274+
}
275+
}
276+
}
277+
```
278+
279+
## Create association with Azure Arc
280+
281+
The following sample creates an association between an Azure Arc-enabled server and a data collection rule.
282+
283+
##### Template file
284+
285+
```bicep
286+
@description('The name of the virtual machine.')
287+
param vmName string
288+
289+
@description('The name of the association.')
290+
param associationName string
291+
292+
@description('The resource ID of the data collection rule.')
293+
param dataCollectionRuleId string
294+
295+
resource vm 'Microsoft.HybridCompute/machines@2021-11-01' existing = {
296+
name: vmName
297+
}
298+
299+
resource association 'Microsoft.Insights/dataCollectionRuleAssociations@2021-09-01-preview' = {
300+
name: associationName
301+
scope: vm
302+
properties: {
303+
description: 'Association of data collection rule. Deleting this association will break the data collection for this Arc server.'
304+
dataCollectionRuleId: dataCollectionRuleId
305+
}
306+
}
307+
```
114308

115-
For sample templates, see [Azure Resource Manager template samples for data collection rules in Azure Monitor](./resource-manager-data-collection-rules.md).
309+
---
310+
311+
##### Parameter file
312+
313+
```json
314+
{
315+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
316+
"contentVersion": "1.0.0.0",
317+
"parameters": {
318+
"vmName": {
319+
"value": "my-azure-vm"
320+
},
321+
"associationName": {
322+
"value": "my-windows-vm-my-dcr"
323+
},
324+
"dataCollectionRuleId": {
325+
"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/microsoft.insights/datacollectionrules/my-dcr"
326+
}
327+
}
328+
}
329+
```
116330

117331
---
118332

0 commit comments

Comments
 (0)