diff --git a/OnbordingTemplates/DeployDcr/.DS_Store b/OnbordingTemplates/DeployDcr/.DS_Store new file mode 100644 index 0000000..1f9bef8 Binary files /dev/null and b/OnbordingTemplates/DeployDcr/.DS_Store differ diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json new file mode 100644 index 0000000..27fd621 --- /dev/null +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "WorkspaceResourceId": { + "value": "/subscriptions//resourceGroups//providers/Microsoft.OperationalInsights/workspaces/" + }, + "WorkspaceLocation": { + "value": "" + }, + "userGivenDcrName": { + "value": "" + } + } +} \ No newline at end of file diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json new file mode 100644 index 0000000..6aea1ab --- /dev/null +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json @@ -0,0 +1,108 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "WorkspaceResourceId": { + "type": "String", + "metadata": { + "description": "Workspace Resource ID." + } + }, + "WorkspaceLocation": { + "type": "String", + "metadata": { + "description": "Workspace Location." + } + }, + "userGivenDcrName": { + "type": "String", + "metadata": { + "displayName": "Name of the Data Collection Rule(DCR)", + "description": "This is the name of the AMA-VMI Data Collection Rule(DCR)" + }, + "defaultValue": "ama-vmi-default-perfAndda-dcr" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat('VMI-DCR-Deployment-',uniqueString(parameters('userGivenDcrName')))]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Insights/dataCollectionRules", + "apiVersion": "2021-04-01", + "name": "[concat('MSVMI-', 'PerfandDa-', parameters('userGivenDcrName'))]", + "location": "[parameters('WorkspaceLocation')]", + "properties": { + "description": "Data collection rule for VM Insights.", + "dataSources": { + "performanceCounters": [ + { + "name": "VMInsightsPerfCounters", + "streams": [ + "Microsoft-InsightsMetrics" + ], + "scheduledTransferPeriod": "PT1M", + "samplingFrequencyInSeconds": 60, + "counterSpecifiers": [ + "\\VmInsights\\DetailedMetrics" + ] + } + ], + "extensions": [ + { + "streams": [ + "Microsoft-ServiceMap" + ], + "extensionName": "DependencyAgent", + "extensionSettings": {}, + "name": "DependencyAgentDataSource" + } + ] + }, + "destinations": { + "logAnalytics": [ + { + "workspaceResourceId": "[parameters('WorkspaceResourceId')]", + "name": "VMInsightsPerf-Logs-Dest" + } + ] + }, + "dataFlows": [ + { + "streams": [ + "Microsoft-InsightsMetrics" + ], + "destinations": [ + "VMInsightsPerf-Logs-Dest" + ] + }, + { + "streams": [ + "Microsoft-ServiceMap" + ], + "destinations": [ + "VMInsightsPerf-Logs-Dest" + ] + } + ] + } + } + ] + } + }, + "subscriptionId": "[split(parameters('WorkspaceResourceId'),'/')[2]]", + "resourceGroup": "[split(parameters('WorkspaceResourceId'),'/')[4]]" + } + ], + "outputs": {} +} \ No newline at end of file diff --git a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json new file mode 100644 index 0000000..27fd621 --- /dev/null +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "WorkspaceResourceId": { + "value": "/subscriptions//resourceGroups//providers/Microsoft.OperationalInsights/workspaces/" + }, + "WorkspaceLocation": { + "value": "" + }, + "userGivenDcrName": { + "value": "" + } + } +} \ No newline at end of file diff --git a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json new file mode 100644 index 0000000..1d7bca3 --- /dev/null +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json @@ -0,0 +1,90 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "WorkspaceResourceId": { + "type": "String", + "metadata": { + "description": "Workspace Resource ID." + } + }, + "WorkspaceLocation": { + "type": "String", + "metadata": { + "description": "Workspace Location." + } + }, + "userGivenDcrName": { + "type": "String", + "metadata": { + "displayName": "Name of the Data Collection Rule(DCR)", + "description": "This is the name of the AMA-VMI Perf only Data Collection Rule(DCR)" + }, + "defaultValue": "ama-vmi-default-perf-dcr" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2021-04-01", + "name": "[concat('VMI-DCR-Deployment-',uniqueString(parameters('userGivenDcrName')))]", + "properties": { + "mode": "Incremental", + "template": { + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": {}, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Insights/dataCollectionRules", + "apiVersion": "2021-04-01", + "name": "[concat('MSVMI-', 'Perf-',parameters('userGivenDcrName'))]", + "location": "[parameters('WorkspaceLocation')]", + "properties": { + "description": "Data collection rule for VM Insights.", + "dataSources": { + "performanceCounters": [ + { + "name": "VMInsightsPerfCounters", + "streams": [ + "Microsoft-InsightsMetrics" + ], + "scheduledTransferPeriod": "PT1M", + "samplingFrequencyInSeconds": 60, + "counterSpecifiers": [ + "\\VmInsights\\DetailedMetrics" + ] + } + ] + }, + "destinations": { + "logAnalytics": [ + { + "workspaceResourceId": "[parameters('WorkspaceResourceId')]", + "name": "VMInsightsPerf-Logs-Dest" + } + ] + }, + "dataFlows": [ + { + "streams": [ + "Microsoft-InsightsMetrics" + ], + "destinations": [ + "VMInsightsPerf-Logs-Dest" + ] + } + ] + } + } + ] + } + }, + "subscriptionId": "[split(parameters('WorkspaceResourceId'),'/')[2]]", + "resourceGroup": "[split(parameters('WorkspaceResourceId'),'/')[4]]" + } + ], + "outputs": {} +} \ No newline at end of file