Freigeben über


Enable Log Analytics in MS OMS on Azure virtual machines

Summary: Learn simple new ways to enable Microsoft Operations Management Suite Log Analytics on your Azure virtual machines.

Anurag Gupta is here today, and I want to talk about new ways to enable Log Analytics from Microsoft Operations Management Suite on your Azure virtual machines. As you already know MS OMS is our simplified cloud-based IT Management solution that provides log analytics, automation, VM backup, and site recovery across your on-premises and public cloud environments. We are excited to announce the integration of the Azure portal with Log Analytics (OMS), which allows you to gain insights even faster.

Overview video

For an overview of how to onboard Azure VMs to Operations Management Suite (OMS), watch this video on YouTube:

video

Azure portal and Log Analytics (OMS) experience

OMS has a new management experience in the Azure portal. This experience allows you to create a new OMS workspace, link an OMS workspace to an Azure subscription, and onboard Windows and Linux Azure VMs into the OMS service.

Onboard pre-existing Windows and Linux Azure VMs to OMS

To onboard your pre-existing Windows and Linux Azure VMs to OMS, select the Log Analytics (OMS)  resource.

Tip   Click the star icon in the right pane to pin the Log Analytics (OMS) resource to your default menu.

Image of menu

From here, select the OMS workspace where you want to onboard your Azure VM. On the OMS Workspace panel, select Virtual Machines.

Image of menu

Select the Windows or Linux virtual machineand click Connect.

Image of menu

That’s it! Within a couple minutes your Azure VM is sending data to OMS.

OMS quickstart ARM templates

If you are new to OMS and want an easy way to see the capabilities offered by the service, we recommend that you sign up for the free tier data plan that includes a 500 MB daily upload limit and 7-day data retention.

When you are signed up with OMS, you can click the following buttons to provision a new Windows or Linux VM that comes pre-installed with the OMS agent.

The OMS Workspace ID and OMS Workspace Key are required to onboard to the OMS service. Log in to the OMS portal and select Settings from the large blue pane or click the workspace name in the drop-down list.

Image of menu

In Settings, select Connected Sources and you can copy the Workspace ID and Primary Key:

Image of menu

 

Additionally, these templates can be deployed through the Azure CLI or Azure PowerShell. For more information, see:

Add Log Analytics (OMS) to pre-existing ARM templates

If your enterprise already has an arsenal of ARM templates, you can insert the following resource snippets to easily add the OMS agent.

Note:  The OMS Workspace ID and OMS Workspace Key are required to onboard the OMS service, and they can be found in the OMS portal under Settings > Connected Sources.

[caption id="" align="aligncenter" width="161"]Windows OMS Quickstart Windows VM OMS Quickstart[/caption]

[caption id="" align="aligncenter" width="161"]Ubuntu VM OMS Quickstart Ubuntu VM OMS Quickstart[/caption]

Additionally, these templates can be deployed through Azure CLI or Azure PowerShell.

Adding Log Analytics (OMS) to your pre-existing ARM Templates

If your enterprise already has an arsenal of ARM Templates, you can insert the resource snippets below to easily add the OMS Agent.

Note: The OMS Workspace ID and OMS Workspace Key are required to onboard the OMS Service and can be found in the OMS Portal under Settings > Connected Sources

Windows resource snippet

 {
  "type": "extensions",
  "name": "Microsoft.EnterpriseCloud.Monitoring",
  "apiVersion": "[variables('apiVersion')]",
  "location": "[resourceGroup().location]",
  "dependsOn": [
    "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
  ],
  "properties": {
    "publisher": "Microsoft.EnterpriseCloud.Monitoring",
    "type": "MicrosoftMonitoringAgent",
    "typeHandlerVersion": "1.0",
    "autoUpgradeMinorVersion": true,
    "settings": {
      "workspaceId": "[parameters('workspaceId')]"
    },
    "protectedSettings": {
      "workspaceKey": "[parameters('workspaceKey')]"
    }
  }
}

Linux resource snippet

 {
  "type": "Microsoft.Compute/virtualMachines/extensions",
  "name": "<extension-deployment-name>",
  "apiVersion": "<api-version>",
  "location": "<location>",
  "dependsOn": [
    "[concat('Microsoft.Compute/virtualMachines/', <vm-name>)]"
  ],
  "properties": {
    "publisher": "Microsoft.EnterpriseCloud.Monitoring",
    "type": "OmsAgentForLinux",
    "typeHandlerVersion": "1.0",
    "settings": {
      "workspaceId": "<workspace id>"
    },
    "protectedSettings": {
      "workspaceKey": "<workspace key>"
    }
  }
}
Supported Operating Systems Version
Ubuntu Server 12.04 LTS, 14.04 LTS, 15.04, 15.10 (x86/x64)
SUSE Linux Enterprise Server 11 and 12 (x86/x64)
Red Hat Enterprise Linux Server 5,6, and 7 (x86/x64)
Oracle Linux Server 5,6, and 7 (x86/x64)
CentOS Linux Server 5,6, and 7 (x86/x64)
Amazon Linux Server 2012.09 –> 2015.09 (x86/x64)
Windows Server 2008 SP1 and above (x86/x64)

 

Overall, the new Azure Integration streamlines creating and integrating Log Analytics into your Azure environment. Pair this ease of deployment with our OMS Free tier (500 MB Daily Upload and 7 Day data retention) and powerful Log Analytics and Insights are only a couple clicks away. We hope to see you on the OMS Service, and are happy to take feedback for new features on our User Voice or answer issues emailed to scdata@microsoft.com

That is all we have for you today. Join us tomorrow when we will present an article about troubleshooting errors in Azure Automation.

We invite you to follow us on Twitter and the Microsoft OMS Facebook site. If you want to learn more about Windows PowerShell, visit the Hey, Scripting Guy! Blog. If you have any questions, send email to  scripter@microsoft.com.

Anurag Gupta, program managerMicrosoft Operations Management Team

Comments

  • Anonymous
    February 09, 2016
    Type in "Windows Resource Snippet" should be "MicrosoftMonitoringAgent" instead of "OmsAgentForLinux".
    • Anonymous
      February 10, 2016
      Nice catch! Thanks Aleksandar
  • Anonymous
    August 14, 2017
    Is it possible to add a server to multiple homes using ARM template?