DEV Community

Carlos Mendible
Carlos Mendible

Posted on • Originally published at carlos.mendible.com on

2

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

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": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "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!

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay