OMS agents

You may have noticed, no assembly or code changes are made to the application to consume Operational Insights. Operational Insights depends on the installation of an agent on virtual machines. These agents keep collecting telemetry data from these hosts and send them to the Operational Insights workspace, where they are stored for a specified period of time depending upon the sku chosen. These agents can be installed manually on virtual machines. ARM virtual machine extensions install agents automatically, immediately after provisioning the virtual machines. The JSON code for provisioning of an agent on a virtual machine is shown here:

{ 
      "apiVersion": "2015-06-15", 
      "type": "Microsoft.Compute/virtualMachines/extensions", 
      "name": "[concat(variables('vmName'),copyIndex(1),'/omsscript')]", 
      "location": "[resourceGroup().location]", 
      "dependsOn": [ 
        "[concat('Microsoft.Compute/virtualMachines/',variables('vmName'),copyIndex(1))]", 
        "[resourceId('Microsoft.Compute/virtualMachines/extensions', concat(variables('vmName'),copyIndex(1)),'powershellscript')]" 
      ], 
      "copy": { 
        "count": "[parameters('countVMs')]", 
        "name": "omsloop" 
      }, 
      "properties": { 
        "publisher": "Microsoft.EnterpriseCloud.Monitoring", 
        "type": "MicrosoftMonitoringAgent", 
        "typeHandlerVersion": "1.0", 
        "settings": { 
          "workspaceId": "[parameters('WorkspaceID')]" 
        }, 
        "protectedSettings": { 
          "workspaceKey": "[listKeys(variables('accountid'),'2015-11-01-preview').primarySharedKey]" 
        } 
      } 
    } 

The workspaceId and accountid are available from the Settings tile of the OMS workspace, and the copy element is used to deploy it to multiple virtual machines. This resource is a child resource of the virtual machine resource, ensuring that this extension is executed whenever a virtual machine is provisioned or updated.

The configuration related to workspace ID and account ID is shown next. The primary key is used as an account ID for configuring the agents using ARM templates.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.204.201