@@ -373,8 +373,7 @@ The AgentSettings DCR currently supports configuring the following parameters:
373
373
374
374
| Parameter | Description | Valid values |
375
375
| --------- | ----------- | ----------- |
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) |
378
377
| `TimeReceivedForForwardedEvents` | Changes WEF column in the Sentinel WEF table to use TimeReceived instead of TimeGenerated data | 0 or 1 |
379
378
380
379
### Setting up AgentSettings DCR
397
396
398
397
[Install AMA](#installation-options) on your VM.
399
398
400
- 1. **Create a DCR via template deployment :**
399
+ 1. **Create a DCR:**
401
400
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 .
403
402
404
403
```json
405
404
{
@@ -431,24 +430,70 @@ N/A
431
430
}
432
431
```
433
432
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:**
438
434
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
+ ```
452
497
453
498
1. **Activate the settings:**
454
499
0 commit comments