14.3 Log Analytics for VM

Task 3: Enable the Log Analytics virtual machine extension

In this task, you will enable the Log Analytics virtual machine extension. This extension installs the Log Analytics agent on Windows and Linux virtual machines. This agent collects data from the virtual machine and transfers it to the Log Analytics workspace that you designate. Once the agent is installed it will be automatically upgraded ensuring you always have the latest features and fixes.

  1. In the Azure portal, navigate back to the Log Analytics workspaces blade, and, in the list of workspaces, click the entry representing the workspace you created in the previous task.

  2. On the Log Analytics workspace blade, in the Workspace Data Sources section, click the Virtual machines entry.

    Note: For the agent to be successfully installed, the virtual machine must be running.

  3. In the list of virtual machines, locate the entry representing the Azure VM myVM you deployed in the first task of this exercise and note that it is listed as Not connected.

  4. Click the myVM entry and then, on the myVM blade, click Connect.

  5. Wait for the virtual machine to connect to the Log Analytics workspace.

    Note: This may take a few minutes. The Status displayed on the myVM blade, will change from Connecting to This workspace.