From 0c413a064a47f038bf57a7c241563a1e76204d8e Mon Sep 17 00:00:00 2001 From: vpidatala Date: Fri, 9 Jun 2023 09:43:37 -0700 Subject: [PATCH 1/6] user/vpidatala/19574990 - adding DCR templates --- OnbordingTemplates/DeployDcr/.DS_Store | Bin 0 -> 6148 bytes .../PerfAndMapDcr/DeployDcrParameters.json | 20 ++++ .../PerfAndMapDcr/DeployDcrTemplate.json | 108 ++++++++++++++++++ .../PerfOnlyDcr/DeployDcrParameters.json | 20 ++++ .../PerfOnlyDcr/DeployDcrTemplate.json | 90 +++++++++++++++ 5 files changed, 238 insertions(+) create mode 100644 OnbordingTemplates/DeployDcr/.DS_Store create mode 100644 OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json create mode 100644 OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json create mode 100644 OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json create mode 100644 OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json diff --git a/OnbordingTemplates/DeployDcr/.DS_Store b/OnbordingTemplates/DeployDcr/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1f9bef84ff5cae9c8451d6093f80b4bfedad9594 GIT binary patch literal 6148 zcmeHK%}(Pm5FVEtBtx^U)vlGD{^spW%uyvuKzH2 z96mi8o(29Swai<5gBLVDIdYI)M?P+v!as4lchfjZ;v4iL&)E@&$M_$JpbwhA_luzy z3p2nBFawjpfW08)>||_*cfkxW0~5pm-46>Kx&%O^&qyt3Q!PO;%A#Yj zFo-iK!h|B4P+?09VZw1-SwF{OVbFwwu*HY4PZqX95&G%4zS8a>9E0341I)lj2Bu86 zM*08X|MmaJAnq{(%)qx|K$Kf/resourceGroups//providers/Microsoft.OperationalInsights/workspaces/" + }, + "WorkspaceLocation": { + "value": "" + }, + "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-dcr" + } + } +} \ 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..fde6479 --- /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-dcr" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "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-', 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..98b10dd --- /dev/null +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json @@ -0,0 +1,20 @@ +{ + "$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": { + "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-dcr" + } + } +} \ 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..33ae3cb --- /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 Data Collection Rule(DCR)" + }, + "defaultValue": "ama-vmi-default-dcr" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Resources/deployments", + "apiVersion": "2017-05-10", + "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-', 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 From 325f4ecec4f6b71bfd654586fbf22ea6a17bfbb6 Mon Sep 17 00:00:00 2001 From: vpidatala Date: Mon, 12 Jun 2023 16:14:00 -0700 Subject: [PATCH 2/6] user/vpidatala/19574990 - addressing PR Comments --- .../DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json | 2 +- OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json index fde6479..f2a4abe 100644 --- a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json @@ -40,7 +40,7 @@ { "type": "Microsoft.Insights/dataCollectionRules", "apiVersion": "2021-04-01", - "name": "[concat('MSVMI-', parameters('userGivenDcrName'))]", + "name": "[concat('MSVMI-', 'Perf&DA-', parameters('userGivenDcrName'))]", "location": "[parameters('WorkspaceLocation')]", "properties": { "description": "Data collection rule for VM Insights.", diff --git a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json index 33ae3cb..564a494 100644 --- a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json @@ -40,7 +40,7 @@ { "type": "Microsoft.Insights/dataCollectionRules", "apiVersion": "2021-04-01", - "name": "[concat('MSVMI-', parameters('userGivenDcrName'))]", + "name": "[concat('MSVMI-', 'Perf-',parameters('userGivenDcrName'))]", "location": "[parameters('WorkspaceLocation')]", "properties": { "description": "Data collection rule for VM Insights.", From 88ff3fa0e9b3be23a47074cee799e603232afd04 Mon Sep 17 00:00:00 2001 From: vpidatala Date: Tue, 13 Jun 2023 10:08:10 -0700 Subject: [PATCH 3/6] updating API Version --- .../DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json | 2 +- OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json index f2a4abe..649a8a2 100644 --- a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json @@ -27,7 +27,7 @@ "resources": [ { "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", + "apiVersion": "2021-04-01", "name": "[concat('VMI-DCR-Deployment-',uniqueString(parameters('userGivenDcrName')))]", "properties": { "mode": "Incremental", diff --git a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json index 564a494..dac801a 100644 --- a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json @@ -27,7 +27,7 @@ "resources": [ { "type": "Microsoft.Resources/deployments", - "apiVersion": "2017-05-10", + "apiVersion": "2021-04-01", "name": "[concat('VMI-DCR-Deployment-',uniqueString(parameters('userGivenDcrName')))]", "properties": { "mode": "Incremental", From a57b588c57967f2667c02ecf81fd56087c624e77 Mon Sep 17 00:00:00 2001 From: vpidatala Date: Tue, 13 Jun 2023 13:38:19 -0700 Subject: [PATCH 4/6] Addressing PR comments --- .../DeployDcr/PerfAndMapDcr/DeployDcrParameters.json | 7 +------ .../DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json | 2 +- .../DeployDcr/PerfOnlyDcr/DeployDcrParameters.json | 7 +------ .../DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json | 4 ++-- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json index 98b10dd..27fd621 100644 --- a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrParameters.json @@ -9,12 +9,7 @@ "value": "" }, "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-dcr" + "value": "" } } } \ No newline at end of file diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json index 649a8a2..e3d456d 100644 --- a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json @@ -20,7 +20,7 @@ "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-dcr" + "defaultValue": "ama-vmi-default-perf&da-dcr" } }, "variables": {}, diff --git a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json index 98b10dd..27fd621 100644 --- a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json @@ -9,12 +9,7 @@ "value": "" }, "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-dcr" + "value": "" } } } \ No newline at end of file diff --git a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json index dac801a..1d7bca3 100644 --- a/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json @@ -18,9 +18,9 @@ "type": "String", "metadata": { "displayName": "Name of the Data Collection Rule(DCR)", - "description": "This is the name of the AMA-VMI Data Collection Rule(DCR)" + "description": "This is the name of the AMA-VMI Perf only Data Collection Rule(DCR)" }, - "defaultValue": "ama-vmi-default-dcr" + "defaultValue": "ama-vmi-default-perf-dcr" } }, "variables": {}, From ba40b5c6446e21ad71440505090bb47808e27b4f Mon Sep 17 00:00:00 2001 From: vpidatala Date: Wed, 14 Jun 2023 14:04:21 -0700 Subject: [PATCH 5/6] user/vpidatala/19574990 - default DCR Name --- .../DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json index e3d456d..a9f6488 100644 --- a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json @@ -20,7 +20,7 @@ "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-perf&da-dcr" + "defaultValue": "ama-vmi-default-perfAndda-dcr" } }, "variables": {}, @@ -40,7 +40,7 @@ { "type": "Microsoft.Insights/dataCollectionRules", "apiVersion": "2021-04-01", - "name": "[concat('MSVMI-', 'Perf&DA-', parameters('userGivenDcrName'))]", + "name": "[concat('MSVMI-', 'PerfAndDa-', parameters('userGivenDcrName'))]", "location": "[parameters('WorkspaceLocation')]", "properties": { "description": "Data collection rule for VM Insights.", From 4f24e84066826b04efa76eb83c9d45eb1220bce1 Mon Sep 17 00:00:00 2001 From: vpidatala Date: Wed, 14 Jun 2023 15:20:30 -0700 Subject: [PATCH 6/6] user/vpidatala/19574990 - default DCR Name-#2 --- .../DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json index a9f6488..6aea1ab 100644 --- a/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json +++ b/OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json @@ -40,7 +40,7 @@ { "type": "Microsoft.Insights/dataCollectionRules", "apiVersion": "2021-04-01", - "name": "[concat('MSVMI-', 'PerfAndDa-', parameters('userGivenDcrName'))]", + "name": "[concat('MSVMI-', 'PerfandDa-', parameters('userGivenDcrName'))]", "location": "[parameters('WorkspaceLocation')]", "properties": { "description": "Data collection rule for VM Insights.",