Skip to content

Commit

Permalink
remove onboarding page
Browse files Browse the repository at this point in the history
  • Loading branch information
masree committed Feb 8, 2025
1 parent a750e22 commit bf7d381
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 501 deletions.
Original file line number Diff line number Diff line change
@@ -1,179 +1,6 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string"
},
"vmLocation": {
"type": "string"
},
"linkedVaults": {
"type": "array"
},
"vmSubscription": {
"type": "string"
},
"vmResourceGroup": {
"type": "string"
},
"dataCollectionRuleId": {
"type": "string",
"metadata": {
"description": "Specifies the Azure resource ID of the data collection rule to associate."
}
},
"workloadConfig": {
"type": "object",
"metadata": {
"description": "The configuration to use with this virtual machine"
}
}
},
"resources": [
{
"apiVersion": "2020-06-01",
"name": "MonitoringVMEnableMSI",
"type": "Microsoft.Resources/deployments",
"subscriptionId": "[parameters('vmSubscription')]",
"resourceGroup": "[parameters('vmResourceGroup')]",
"properties": {
"mode": "Incremental",
"expressionEvaluationOptions": {
"scope": "inner"
},
"parameters": {
"vmName": {
"value": "[parameters('vmName')]"
},
"vmLocation": {
"value": "[parameters('vmLocation')]"
}
},
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string"
},
"vmLocation": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2020-12-01",
"name": "[parameters('vmName')]",
"type": "Microsoft.Compute/virtualMachines",
"location": "[parameters('vmLocation')]",
"identity": {
"type": "SystemAssigned"
}
}
],
"outputs": {
"managedIdentityObjectId": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Compute/virtualMachines', parameters('vmName')), '2020-12-01', 'Full').identity.principalId]"
}
}
}
}
},
{
"apiVersion": "2020-06-01",
"name": "[concat('KVAccess-', copyIndex())]",
"type": "Microsoft.Resources/deployments",
"subscriptionId": "[if(equals(length(parameters('linkedVaults')), 0), parameters('vmSubscription'), parameters('linkedVaults')[copyIndex()].subscription)]",
"resourceGroup": "[if(equals(length(parameters('linkedVaults')), 0), parameters('vmResourceGroup'), parameters('linkedVaults')[copyIndex()].resourceGroup)]",
"copy": {
"name": "kvpolicycopy",
"count": "[length(parameters('linkedVaults'))]"
},
"dependsOn": [
"[resourceId(parameters('vmSubscription'), parameters('vmResourceGroup'), 'Microsoft.Resources/deployments', 'MonitoringVMEnableMSI')]"
],
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.KeyVault/vaults/accessPolicies",
"name": "[concat(parameters('linkedVaults')[copyIndex()].name, '/add')]",
"apiVersion": "2019-09-01",
"properties": {
"accessPolicies": [
{
"tenantId": "[subscription().tenantId]",
"objectId": "[reference('MonitoringVMEnableMSI').outputs.managedIdentityObjectId.value]",
"permissions": {
"secrets": [ "get" ]
}
}
]
}
}
]
}
}
},
{
"apiVersion": "2020-06-01",
"name": "MonitoringVmSetupTemplate",
"type": "Microsoft.Resources/deployments",
"subscriptionId": "[parameters('vmSubscription')]",
"resourceGroup": "[parameters('vmResourceGroup')]",
"properties": {
"mode": "Incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2020-12-01",
"name": "[concat(parameters('vmName'),'/', 'AzureMonitorLinuxAgent')]",
"location": "[parameters('vmLocation')]",
"properties": {
"publisher": "Microsoft.Azure.Monitor",
"type": "AzureMonitorLinuxAgent",
"typeHandlerVersion": "1.5",
"autoUpgradeMinorVersion": true
}
},
{
"name": "[concat(parameters('vmName'), '/Workload.WLILinuxExtension')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"apiVersion": "2020-12-01",
"location": "[parameters('vmLocation')]",
"properties": {
"publisher": "Microsoft.Azure.Monitor.Workloads",
"type": "Workload.WLILinuxExtension",
"typeHandlerVersion": "0.2",
"autoUpgradeMinorVersion": true,
"settings": {
"workloadConfig": "[parameters('workloadConfig')]"
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/providers/dataCollectionRuleAssociations",
"name": "[concat(parameters('vmName'),'/microsoft.insights', substring(parameters('dataCollectionRuleId'), lastIndexOf(parameters('dataCollectionRuleId'),'/')))]",
"apiVersion": "2019-11-01-preview",
"properties": {
"description": "Association of data collection rule for Azure Workload Insights. Deleting this association will break the detection of insights from this virtual machine.",
"dataCollectionRuleId": "[parameters('dataCollectionRuleId')]"
}
}
]
}
},
"dependsOn": [
"kvpolicycopy"
]
}
]
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"resources": []
}
Original file line number Diff line number Diff line change
@@ -1,47 +1,6 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"value": "monitoring-vm-name"
},
"workloadConfig": {
"value": {
"parameters": {
"sqlAzureConnections": [
],
"sqlVmConnections": [],
"sqlManagedInstanceConnections": []
},
"version": 1,
"secrets": {
"telegrafPassword": {
"name": "sqlDBPassword",
"keyvault": "https://keyvault.vault.azure.net/"
}
}
}
},
"vmLocation": {
"value": "monitoring-vm-location"
},
"linkedVaults": {
"value": [
{
"name": "keyvault",
"subscription": "keyvault-sub",
"resourceGroup": "keyvault-rg"
}
]
},
"vmSubscription": {
"value": "monitoring-vm-subscription-id"
},
"vmResourceGroup": {
"value": "monitoring-vm-rg"
},
"dataCollectionRuleId": {
"value": "dcr-resource-id"
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {}
}
}
Original file line number Diff line number Diff line change
@@ -1,91 +1,6 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dcrName": {
"type": "string"
},
"dcrLocation": {
"type": "string"
},
"insight": {
"type": "string"
},
"destinationName": {
"type": "string"
},
"dataSource": {
"type": "string",
"defaultValue": "DataSource1",
"metadata": {
"description": "Name of the data source"
}
},
"workspaceResourceId": {
"type": "string"
},
"serializedTelegrafConfig": {
"type": "string",
"metadata": {
"description": "Telegraf config"
}
}
},
"resources": [
{
"type": "Microsoft.Insights/dataCollectionRules",
"name": "[parameters('dcrName')]",
"location": "[parameters('dcrLocation')]",
"apiVersion": "2019-11-01-preview",
"tags": {
"monitoring-insight": "[parameters('insight')]"
},
"properties": {
"dataSources": {
"extensions": [
{
"name": "[parameters('dataSource')]",
"streams": [
"Microsoft-InsightsMetrics",
"Microsoft-WorkloadDiagnosticLogs"
],
"extensionName": "WorkloadInsights",
"extensionSettings": {
"id": "[parameters('insight')]",
"type": "Telegraf",
"format": "toml",
"value": "[parameters('serializedTelegrafConfig')]"
}
}
]
},
"destinations": {
"logAnalytics": [
{
"workspaceResourceId": "[parameters('workspaceResourceId')]",
"workspaceId": "[reference(parameters('workspaceResourceId'), '2020-08-01').customerId]",
"name": "[parameters('destinationName')]"
}
]
},
"dataFlows": [
{
"streams": [
"Microsoft-InsightsMetrics",
"Microsoft-WorkloadDiagnosticLogs"
],
"destinations": [
"[parameters('destinationName')]"
]
}
]
}
}
],
"outputs": {
"dataCollectionRuleId": {
"type": "string",
"value": "[resourceId('Microsoft.Insights/dataCollectionRules', parameters('dcrName'))]"
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"resources": []
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dcrName": {
"value": "dcr-name"
},
"dcrLocation": {
"value": "dcr-location-must-be-equal-to-workspace-location"
},
"insight": {
"value": "SqlInsights"
},
"destinationName": {
"value": "SqlInsightsWorkspace"
},
"workspaceResourceId": {
"value": "Workspace-Resource-Id"
},
"serializedTelegrafConfig": {
"value": "{{ $partitionLimit := 10 }}\n{{ $sqlAzureConnections := .Parameters.sqlAzureConnections }}\n{{ $sqlAzurePartitioned := chunk $partitionLimit $sqlAzureConnections }}\n{{ $sqlVmConnections := .Parameters.sqlVmConnections }}\n{{ $sqlVmPartitioned := chunk $partitionLimit $sqlVmConnections }}\n{{ $sqlManagedInstanceConnections := .Parameters.sqlManagedInstanceConnections }}\n{{ $sqlManagedInstancePartitioned := chunk $partitionLimit $sqlManagedInstanceConnections }}\n\n{{- if $sqlAzureConnections}}\n {{- range $ind, $p := $sqlAzurePartitioned }}\n [[inputs.sqlserver]]\n interval = \"50s\"\n collection_jitter = \"20s\"\n servers = [\n {{- range $ind, $cs := $p }}\n {{- if $ind}}, {{end}}\n\t\t \"{{ $cs }}\"\n\t\t {{- end}}\n\t ]\n\t database_type = \"AzureSQLDB\"\n\t include_query = ['AzureSQLDBOsWaitstats','AzureSQLDBMemoryClerks','AzureSQLDBDatabaseIO','AzureSQLDBServerProperties','AzureSQLDBPerformanceCounters','AzureSQLDBResourceStats','AzureSQLDBResourceGovernance']\n {{- end}}\n{{- end}}\n\n{{- if $sqlVmConnections}}\n {{- range $ind, $p := $sqlVmPartitioned }}\n [[inputs.sqlserver]]\n interval = \"50s\"\n collection_jitter = \"20s\"\n servers = [\n {{- range $ind, $cs := $p }}\n {{- if $ind}}, {{end}}\n\t\t \"{{ $cs }}\"\n\t\t {{- end}}\n\t ]\n\t database_type = \"SQLServer\"\n\t include_query = ['SQLServerWaitStatsCategorized','SQLServerMemoryClerks','SQLServerDatabaseIO','SQLServerProperties','SQLServerPerformanceCounters','SQLServerVolumeSpace','SQLServerCpu']\n {{- end}}\n{{- end}}\n\n{{- if $sqlManagedInstanceConnections}}\n {{- range $ind, $p := $sqlManagedInstancePartitioned }}\n [[inputs.sqlserver]]\n interval = \"50s\"\n collection_jitter = \"20s\"\n servers = [\n {{- range $ind, $cs := $p }}\n {{- if $ind}}, {{end}}\n\t\t \"{{ $cs }}\"\n\t\t {{- end}}\n\t]\n\tdatabase_type = \"AzureSQLManagedInstance\"\n\tinclude_query = ['AzureSQLMIOsWaitstats','AzureSQLMIMemoryClerks','AzureSQLMIDatabaseIO','AzureSQLMIServerProperties','AzureSQLMIPerformanceCounters','AzureSQLMIResourceStats','AzureSQLMIResourceGovernance']\n {{- end}}\n{{- end}}\n\n[[inputs.internal]]"
}
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dcrName": {
"value": "dcr-name"
},
"dcrLocation": {
"value": "dcr-location-must-be-equal-to-workspace-location"
},
"insight": {
"value": "SqlInsights"
},
"destinationName": {
"value": "SqlInsightsWorkspace"
},
"workspaceResourceId": {
"value": "Workspace-Resource-Id"
},
"serializedTelegrafConfig": {
"value": "{{ $partitionLimit := 10 }}\n{{ $sqlAzureConnections := .Parameters.sqlAzureConnections }}\n{{ $sqlAzurePartitioned := chunk $partitionLimit $sqlAzureConnections }}\n{{ $sqlVmConnections := .Parameters.sqlVmConnections }}\n{{ $sqlVmPartitioned := chunk $partitionLimit $sqlVmConnections }}\n{{ $sqlManagedInstanceConnections := .Parameters.sqlManagedInstanceConnections }}\n{{ $sqlManagedInstancePartitioned := chunk $partitionLimit $sqlManagedInstanceConnections }}\n\n{{- if $sqlAzureConnections}}\n {{- range $ind, $p := $sqlAzurePartitioned }}\n [[inputs.sqlserver]]\n interval = \"50s\"\n collection_jitter = \"20s\"\n servers = [\n {{- range $ind, $cs := $p }}\n {{- if $ind}}, {{end}}\n\t\t \"{{ $cs }}\"\n\t\t {{- end}}\n\t ]\n\t database_type = \"AzureSQLDB\"\n\t include_query = ['AzureSQLDBOsWaitstats','AzureSQLDBMemoryClerks','AzureSQLDBDatabaseIO','AzureSQLDBServerProperties','AzureSQLDBPerformanceCounters','AzureSQLDBResourceStats','AzureSQLDBResourceGovernance']\n {{- end}}\n{{- end}}\n\n{{- if $sqlVmConnections}}\n {{- range $ind, $p := $sqlVmPartitioned }}\n [[inputs.sqlserver]]\n interval = \"50s\"\n collection_jitter = \"20s\"\n servers = [\n {{- range $ind, $cs := $p }}\n {{- if $ind}}, {{end}}\n\t\t \"{{ $cs }}\"\n\t\t {{- end}}\n\t ]\n\t database_type = \"SQLServer\"\n\t include_query = ['SQLServerWaitStatsCategorized','SQLServerMemoryClerks','SQLServerDatabaseIO','SQLServerProperties','SQLServerPerformanceCounters','SQLServerVolumeSpace','SQLServerCpu']\n {{- end}}\n{{- end}}\n\n{{- if $sqlManagedInstanceConnections}}\n {{- range $ind, $p := $sqlManagedInstancePartitioned }}\n [[inputs.sqlserver]]\n interval = \"50s\"\n collection_jitter = \"20s\"\n servers = [\n {{- range $ind, $cs := $p }}\n {{- if $ind}}, {{end}}\n\t\t \"{{ $cs }}\"\n\t\t {{- end}}\n\t]\n\tdatabase_type = \"AzureSQLManagedInstance\"\n\tinclude_query = ['AzureSQLMIOsWaitstats','AzureSQLMIMemoryClerks','AzureSQLMIDatabaseIO','AzureSQLMIServerProperties','AzureSQLMIPerformanceCounters','AzureSQLMIResourceStats','AzureSQLMIResourceGovernance']\n {{- end}}\n{{- end}}\n\n[[inputs.internal]]"
}
}
}
Loading

0 comments on commit bf7d381

Please sign in to comment.