-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ARM templates for onboarding VM/VMSS/LA Workspace to Azure Moni…
…tor for VMs
- Loading branch information
0 parents
commit 0125d1f
Showing
11 changed files
with
1,175 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
OnbordingTemplates/ConfigureWorkspace/ConfigureWorkspaceParameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$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>" | ||
} | ||
} | ||
} |
418 changes: 418 additions & 0 deletions
418
OnbordingTemplates/ConfigureWorkspace/ConfigureWorkspaceTemplate.json
Large diffs are not rendered by default.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
OnbordingTemplates/ExistingVmOnboarding/ExistingVmOnboardingParameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"vmResourceId": { | ||
"value": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.Compute/virtualMachines/<VirtualMachineName>" | ||
}, | ||
"vmLocation": { | ||
"value": "<VirtualMachineLocation>" | ||
}, | ||
"osType": { | ||
"value": "<OSType>" | ||
}, | ||
"workspaceResourceId": { | ||
"value": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.OperationalInsights/workspaces/<WorkspaceName>" | ||
} | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
OnbordingTemplates/ExistingVmOnboarding/ExistingVmOnboardingTemplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"VmResourceId": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "VM Resource ID." | ||
} | ||
}, | ||
"VmLocation": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "The Virtual Machine Location." | ||
} | ||
}, | ||
"osType": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "OS Type, Example: Linux / Windows" | ||
} | ||
}, | ||
"WorkspaceResourceId": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "Workspace Resource ID." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"VmName": "[split(parameters('VmResourceId'),'/')[8]]", | ||
"DaExtensionName": "[if(equals(toLower(parameters('osType')), 'windows'), 'DependencyAgentWindows', 'DependencyAgentLinux')]", | ||
"DaExtensionType": "[if(equals(toLower(parameters('osType')), 'windows'), 'DependencyAgentWindows', 'DependencyAgentLinux')]", | ||
"DaExtensionVersion": "9.5", | ||
"MmaExtensionName": "[if(equals(toLower(parameters('osType')), 'windows'), 'MMAExtension', 'OMSExtension')]", | ||
"MmaExtensionType": "[if(equals(toLower(parameters('osType')), 'windows'), 'MicrosoftMonitoringAgent', 'OmsAgentForLinux')]", | ||
"MmaExtensionVersion": "[if(equals(toLower(parameters('osType')), 'windows'), '1.0', '1.4')]" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Compute/virtualMachines", | ||
"apiVersion": "2018-10-01", | ||
"name": "[variables('VmName')]", | ||
"location": "[parameters('VmLocation')]", | ||
"resources": [ | ||
{ | ||
"type": "extensions", | ||
"apiVersion": "2018-10-01", | ||
"name": "[variables('DaExtensionName')]", | ||
"location": "[parameters('VmLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Compute/VirtualMachines/', variables('VmName'))]" | ||
], | ||
"properties": { | ||
"publisher": "Microsoft.Azure.Monitoring.DependencyAgent", | ||
"type": "[variables('DaExtensionType')]", | ||
"typeHandlerVersion": "[variables('DaExtensionVersion')]", | ||
"autoUpgradeMinorVersion": true | ||
} | ||
}, | ||
{ | ||
"type": "extensions", | ||
"apiVersion": "2018-10-01", | ||
"name": "[variables('MmaExtensionName')]", | ||
"location": "[parameters('VmLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Compute/VirtualMachines/', variables('VmName'))]" | ||
], | ||
"properties": { | ||
"publisher": "Microsoft.EnterpriseCloud.Monitoring", | ||
"type": "[variables('MmaExtensionType')]", | ||
"typeHandlerVersion": "[variables('MmaExtensionVersion')]", | ||
"autoUpgradeMinorVersion": "true", | ||
"settings": { | ||
"workspaceId": "[reference(parameters('WorkspaceResourceId'), '2015-03-20').customerId]", | ||
"azureResourceId": "[parameters('VmResourceId')]", | ||
"stopOnMultipleConnections": "true" | ||
}, | ||
"protectedSettings": { | ||
"workspaceKey": "[listKeys(parameters('WorkspaceResourceId'), '2015-03-20').primarySharedKey]" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"outputs": {} | ||
} |
18 changes: 18 additions & 0 deletions
18
OnbordingTemplates/ExistingVmssOnboarding/ExistingVmssOnboardingParameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"VmssResourceId": { | ||
"value": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.Compute/virtualMachines/<VirtualMachineScaleSetName>" | ||
}, | ||
"VmssLocation": { | ||
"value": "<VirtualMachineScaleSetLocation>" | ||
}, | ||
"OsType": { | ||
"value": "<OSType>" | ||
}, | ||
"WorkspaceResourceId": { | ||
"value": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.OperationalInsights/workspaces/<WorkspaceName>" | ||
} | ||
} | ||
} |
88 changes: 88 additions & 0 deletions
88
OnbordingTemplates/ExistingVmssOnboarding/ExistingVmssOnboardingTemplate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"VmssResourceId": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "VM Resource ID." | ||
} | ||
}, | ||
"VmssLocation": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "The Virtual Machine Location." | ||
} | ||
}, | ||
"osType": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "OS Type, Example: Linux / Windows" | ||
} | ||
}, | ||
"WorkspaceResourceId": { | ||
"type": "String", | ||
"metadata": { | ||
"description": "Workspace Resource ID." | ||
} | ||
} | ||
}, | ||
"variables": { | ||
"VmssName": "[split(parameters('VmssResourceId'),'/')[8]]", | ||
"DaExtensionName": "[if(equals(toLower(parameters('osType')), 'windows'), 'DependencyAgentWindows', 'DependencyAgentLinux')]", | ||
"DaExtensionType": "[if(equals(toLower(parameters('osType')), 'windows'), 'DependencyAgentWindows', 'DependencyAgentLinux')]", | ||
"DaExtensionVersion": "9.5", | ||
"MmaExtensionName": "[if(equals(toLower(parameters('osType')), 'windows'), 'MMAExtension', 'OMSExtension')]", | ||
"MmaExtensionType": "[if(equals(toLower(parameters('osType')), 'windows'), 'MicrosoftMonitoringAgent', 'OmsAgentForLinux')]", | ||
"MmaExtensionVersion": "[if(equals(toLower(parameters('osType')), 'windows'), '1.0', '1.4')]" | ||
}, | ||
"resources": [ | ||
{ | ||
"type": "Microsoft.Compute/virtualMachineScaleSets", | ||
"apiVersion": "2018-10-01", | ||
"name": "[variables('VmssName')]", | ||
"location": "[parameters('VmssLocation')]", | ||
"resources": [ | ||
{ | ||
"type": "extensions", | ||
"apiVersion": "2018-10-01", | ||
"name": "[variables('DaExtensionName')]", | ||
"location": "[parameters('VmssLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Compute/virtualMachineScaleSets/', variables('VmssName'))]" | ||
], | ||
"properties": { | ||
"publisher": "Microsoft.Azure.Monitoring.DependencyAgent", | ||
"type": "[variables('DaExtensionType')]", | ||
"typeHandlerVersion": "[variables('DaExtensionVersion')]", | ||
"autoUpgradeMinorVersion": true | ||
} | ||
}, | ||
{ | ||
"type": "extensions", | ||
"apiVersion": "2018-10-01", | ||
"name": "[variables('MmaExtensionName')]", | ||
"location": "[parameters('VmssLocation')]", | ||
"dependsOn": [ | ||
"[concat('Microsoft.Compute/virtualMachineScaleSets/', variables('VmssName'))]" | ||
], | ||
"properties": { | ||
"publisher": "Microsoft.EnterpriseCloud.Monitoring", | ||
"type": "[variables('MmaExtensionType')]", | ||
"typeHandlerVersion": "[variables('MmaExtensionVersion')]", | ||
"autoUpgradeMinorVersion": "true", | ||
"settings": { | ||
"workspaceId": "[reference(parameters('WorkspaceResourceId'), '2015-03-20').customerId]", | ||
"azureResourceId": "[parameters('VmssResourceId')]", | ||
"stopOnMultipleConnections": "true" | ||
}, | ||
"protectedSettings": { | ||
"workspaceKey": "[listKeys(parameters('WorkspaceResourceId'), '2015-03-20').primarySharedKey]" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"outputs": {} | ||
} |
50 changes: 50 additions & 0 deletions
50
OnbordingTemplates/NewVmOnboarding/NewVmOnboardingParameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"location": { | ||
"value": "<VirtualMachineLocation>" | ||
}, | ||
"image": { | ||
"value": { | ||
"publisher": "<ImagePublisher>", | ||
"offer": "<ImageOffer>", | ||
"sku": "<ImageSKU>", | ||
"version": "<ImageVersion>" | ||
} | ||
}, | ||
"osType": { | ||
"value": "<OSType>" | ||
}, | ||
"networkInterfaceName": { | ||
"value": "<NetworkInterfaceName>" | ||
}, | ||
"subnetName": { | ||
"value": "default" | ||
}, | ||
"virtualNetworkId": { | ||
"value": "/subscriptions/<SubscriptionId>/<ResourceGroup>/VmBladeTest/providers/Microsoft.Network/virtualNetworks/<VirtualNetworkName>" | ||
}, | ||
"workspaceId": { | ||
"value": "/subscriptions/<SubscriptionId>/resourceGroups/<ResourceGroup>/providers/Microsoft.OperationalInsights/workspaces/<WorkspaceName>" | ||
}, | ||
"virtualMachineName": { | ||
"value": "<VirtualMachineName>" | ||
}, | ||
"virtualMachineRG": { | ||
"value": "<VirtualMachineResourceGroup>" | ||
}, | ||
"osDiskType": { | ||
"value": "<OSDiskType>" | ||
}, | ||
"virtualMachineSize": { | ||
"value": "<VirtualMachineSize>" | ||
}, | ||
"adminUsername": { | ||
"value": "<UserName>" | ||
}, | ||
"adminPassword": { | ||
"value": "<Password>" | ||
} | ||
} | ||
} |
Oops, something went wrong.