Skip to content

Commit 46361ec

Browse files
Merge pull request #284282 from guywi-ms/patch-122
Fix agent settings DCR section
2 parents d99b262 + d02b4a8 commit 46361ec

File tree

1 file changed

+66
-21
lines changed

1 file changed

+66
-21
lines changed

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

Lines changed: 66 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,7 @@ The AgentSettings DCR currently supports configuring the following parameters:
373373
374374
| Parameter | Description | Valid values |
375375
| --------- | ----------- | ----------- |
376-
377-
| `DiscQuotaInMb` | Defines the amount of disk space used by the Azure Monitor Agent log files and cache. | 1,000-50,000 (or 1-50 GB) |
376+
| `MaxDiskQuotaInMB` | Defines the amount of disk space used by the Azure Monitor Agent log files and cache. | 1000-50000 (in MB) |
378377
| `TimeReceivedForForwardedEvents` | Changes WEF column in the Sentinel WEF table to use TimeReceived instead of TimeGenerated data | 0 or 1 |
379378
380379
### Setting up AgentSettings DCR
@@ -397,9 +396,9 @@ N/A
397396
398397
[Install AMA](#installation-options) on your VM.
399398
400-
1. **Create a DCR via template deployment:**
399+
1. **Create a DCR:**
401400
402-
The following example changes the maximum amount of disk space used by AMA cache to 5 GB.
401+
This example sets the maximum amount of disk space used by AMA cache to 5000 MB.
403402
404403
```json
405404
{
@@ -431,24 +430,70 @@ N/A
431430
}
432431
```
433432
434-
> [!NOTE]
435-
> You can use the Get DataCollectionRule API to get the DCR payload you created with this template.
436-
437-
1. **Associate DCR with your machine:**
433+
1. **Associate the DCR with your machine:**
438434
439-
This can be done with a template or by using the [Create API](/rest/api/monitor/data-collection-rule-associations/create) with the following details:
440-
441-
* **AssociationName:** agentSettings
442-
* **ResourceUri:** Full ARM ID of the VM
443-
* **api-version:** 2023-03-11 (Old API version is also fine)
444-
* **Body:**
445-
```json
446-
{
447-
"properties": {
448-
"dataCollectionRuleId": “Full ARM ID for agent setting DCR”
449-
}
450-
}
451-
```
435+
Use these ARM template and parameter files:
436+
437+
**ARM template file**
438+
439+
```json
440+
{
441+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
442+
"contentVersion": "1.0.0.0",
443+
"parameters": {
444+
"vmName": {
445+
"type": "string",
446+
"metadata": {
447+
"description": "The name of the virtual machine."
448+
}
449+
},
450+
"associationName": {
451+
"type": "string",
452+
"metadata": {
453+
"description": "The name of the association."
454+
}
455+
},
456+
"dataCollectionRuleId": {
457+
"type": "string",
458+
"metadata": {
459+
"description": "The resource ID of the data collection rule."
460+
}
461+
}
462+
},
463+
"resources": [
464+
{
465+
"type": "Microsoft.Insights/dataCollectionRuleAssociations",
466+
"apiVersion": "2021-09-01-preview",
467+
"scope": "[format('Microsoft.Compute/virtualMachines/{0}', parameters('vmName'))]",
468+
"name": "[parameters('associationName')]",
469+
"properties": {
470+
"description": "Association of data collection rule. Deleting this association will break the data collection for this virtual machine.",
471+
"dataCollectionRuleId": "[parameters('dataCollectionRuleId')]"
472+
}
473+
}
474+
]
475+
}
476+
```
477+
478+
**Parameter file**
479+
480+
```json
481+
{
482+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
483+
"contentVersion": "1.0.0.0",
484+
"parameters": {
485+
"vmName": {
486+
"value": "my-azure-vm"
487+
},
488+
"associationName": {
489+
"value": "my-windows-vm-my-dcr"
490+
},
491+
"dataCollectionRuleId": {
492+
"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/microsoft.insights/datacollectionrules/my-dcr"
493+
}
494+
}
495+
}
496+
```
452497
453498
1. **Activate the settings:**
454499

0 commit comments

Comments
 (0)