How to connect VM to Log Analytics Workspace?

Brenda Lim from.TP (LTA) 20 Reputation points
2023-06-16T04:27:02.57+00:00

Hi, I have just created a new Data Collection Rule (DCR) and a Log Analytics Workspace (LAW). I have a Windows Azure VM set up, but I am not sure how to connect the VM to the LAW.

I think I need to use the workspace ID, primary / secondary keys that are shown on the page below, but I am not sure where to input them in the VM.User's image

Please help. Thank you!

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 29,306 Reputation points MVP Volunteer Moderator
    2023-06-16T05:51:35.9366667+00:00

    Hi,

    When you use Data collection rules where the data is send (to which Log Analytics workspace) is defined withing the DCR. What you need to do is assign the DCR to the VM:

    User's image

    Azure Monitor agent on the VM will read the configuration, collect the data and send it to the workspace defined in the DCR.

    Note: DCRs use Azure Monitor agent, not Azure Log Analytics agent (legacy).

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.