Skip to content

Commit

Permalink
Merge pull request #4 from vpidatala94/user/vpidatala/19574990
Browse files Browse the repository at this point in the history
user/vpidatala/19574990 - adding VMI DCR templates
  • Loading branch information
vpidatala94 authored Jun 16, 2023
2 parents a3e2b41 + 4f24e84 commit 44f72ad
Show file tree
Hide file tree
Showing 5 changed files with 228 additions and 0 deletions.
Binary file added OnbordingTemplates/DeployDcr/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.OperationalInsights/workspaces/<WorkspaceName>"
},
"WorkspaceLocation": {
"value": "<WorkspaceLocation>"
},
"userGivenDcrName": {
"value": "<DcrResourceId>"
}
}
}
108 changes: 108 additions & 0 deletions OnbordingTemplates/DeployDcr/PerfAndMapDcr/DeployDcrTemplate.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
15 changes: 15 additions & 0 deletions OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrParameters.json
Original file line number Diff line number Diff line change
@@ -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/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.OperationalInsights/workspaces/<WorkspaceName>"
},
"WorkspaceLocation": {
"value": "<WorkspaceLocation>"
},
"userGivenDcrName": {
"value": "<DcrResourceId>"
}
}
}
90 changes: 90 additions & 0 deletions OnbordingTemplates/DeployDcr/PerfOnlyDcr/DeployDcrTemplate.json
Original file line number Diff line number Diff line change
@@ -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": {}
}

0 comments on commit 44f72ad

Please sign in to comment.