In a previous post I talked about Operations Management Suite aka Log Analytics and how it can help you achieve a better understanding of what’s happening on your on-premise and cloud resources. In this blog post I will show you how to enroll your Azure VMs in OMS.

There are four ways you can enroll your Azure virtual machines in OMS:

PowerShell. (Saw that coming didn’t you?)
Installing OMS Agent at provisioning time using an ARM JSON Template.
Connecting the Azure VMs to OMS from the portal.
Manually installing the Windows / Linux agent.

Let’s tackle the first three scenarios, shall we?

1. To connect your Azure VMs to OMS, I created a very simple interactive script that can help you do this operation with ease. Make sure that you have the latest Azure PS cmdlets installed.

2. To enroll a VM at provisioning time you need to deploy it using an ARM Template. I suggest using Visual Studio with the latest Azure SDK in order to ease the template creation process. With Visual Studio you have a graphical interface that allows you to add and nest resources as you please. Try it, you will love it 🙂

Here’s an example ARM template that handles both Linux and Windows scenarios:

3. Enrolling VMs from the Azure Portal is very a very simple operation. You basically go to your Log Analytics resource located in your Azure subscription, select Virtual Machines and press connect on each virtual machine that shows the status “Not Connected”. The downside of doing it this way, is that if you have a lot of VMs that you want to enroll in your Log Analytics account, then it will take a lot of clicking.


Privacy Preference Center

    Pin It on Pinterest