DEV Community


ARM: Enable Container Monitoring Solution on an existing Log Analytics Workspace

Carlos Mendible
Cloud Solution Architect @Microsoft | Opinions are my own
Originally published at on ・1 min read

Recently I had to update a bunch of Log Analytics Workspaces resources to enable the Container Monitoring Solution in order to monitor some new Azure Kubernetes Services instances. So I came up with this ARM Template that I want to share with you:

    "$schema": "",
    "contentVersion": "",
    "parameters": {
        "LogAnalyticsWorkspaceName": {
            "type": "string",
            "metadata": {
                "description": "Log Analytics Workspace name"
    "variables": {
        "workspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces/', parameters('LogAnalyticsWorkspaceName'))]",
        "containerSolutionName": "[concat(parameters('LogAnalyticsWorkspaceName'), '-containers')]"
    "resources": [
            "type": "Microsoft.OperationsManagement/solutions",
            "apiVersion": "2015-11-01-preview",
            "name": "[variables('containerSolutionName')]",
            "location": "[resourceGroup().location]",
            "plan": {
                "name": "[variables('containerSolutionName')]",
                "product": "[concat('OMSGallery/', 'ContainerInsights')]",
                "promotionCode": "",
                "publisher": "Microsoft"
            "properties": {
                "workspaceResourceId": "[variables('workspaceResourceId')]"
    "outputs": {}
Enter fullscreen mode Exit fullscreen mode

Hope it helps!

Discussion (0)