Module 9: Assignment - 2

Tasks To Be Performed:

  1. Use the previously connected VMs
  2. Connect Log Analytics to this virtual machine

Step 1: Create a Log Analytics Workspace

  1. Log into the Azure portal: portal.azure.com.
  2. Go to All services and search for Log Analytics.
  3. Select Log Analytics workspaces.
  4. In the Log Analytics workspaces blade, click Create.
  5. Enter the necessary information: Subscription, Resource Group, Name, and Region.
  6. Click Next to select a Pricing tier, and then choose the appropriate pricing tier.
  7. Review your settings and click Create.
  8. Refresh the Log Analytics workspaces blade to display the new workspace.


Step 3: Connect Virtual Machines to the Log Analytics Workspace

  1. In the Azure portal, go to the workspace you created in Step 1.
  2. Click on “Connect a data source” and choose “Azure Virtual machine (VMs)“.

  3. Search for the virtual machine you want to connect.

  4. Click the entry of your virtual machine and then click Connect.
  5. Wait for the extension to be installed on the virtual machine.

VIDEO

create the workspace goes to resource Click connect a data source, azure virtual selects the VM, just to look

goes to the “agent” in the left side of workspae “legacy actiivty log connector”

create diagnostics settings, creates one, all logs all metrics


creates diagnostic settings

then goes to logs to run some queries


create the works pace

To connect the VM

We select allLogs, AllMetrics and select “Send to Log Analytics workspace”

back in workspace we click Logs and try a query