Troubleshooting Heartbeat Data Issues for Azure Virtual Machine Using AMA

SwathiDhanwada-MSFT 18,996 Reputation points Moderator
2024-08-01T04:46:14.22+00:00

Why am I unable to receive the heartbeat data for my Azure Virtual Machine (VM) using the Azure Monitor Agent (AMA)?

PS - Based on common issues that we have seen from customers and other sources, we are posting these questions to help the Azure community.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,645 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,996 Reputation points Moderator
    2024-08-01T04:48:07.51+00:00

    The issue of not receiving heartbeat data for your Azure Virtual Machine (VM) using the Azure Monitor Agent (AMA) typically occurs when the agent cannot connect to the monitoring endpoints to fetch the configuration. In this specific case, the problem was identified as a connectivity issue due to the machine not being whitelisted for the AMA agent endpoints. Here are the steps taken to resolve the issue:

    1. Check Agent Status: Ensure that the AMA extension status is provisioned successfully with the latest version.
    2. Log Analysis: Review the logs to identify any connection errors. For instance, the error message "WinHttpSendRequest: 12002: The operation timed out" indicates a connectivity problem.
    3. Network Connectivity Test: Perform a connectivity check to the monitoring endpoint from the VM using the command:
      
         Test-NetConnection global.handler.control.monitor.azure.com -Port 443
      
      
      This will help determine if the VM can reach the monitoring endpoint.
    4. Firewall Whitelisting: Verify if there is a firewall in place that might be blocking the connection. Ensure the VM is whitelisted for the AMA agent endpoints as per the firewall requirements documented here: Azure Monitor Agent Data Collection Endpoint Firewall Requirements.

    Once the endpoints are whitelisted, check if the heartbeat data starts appearing in the Log Analytics workspace. In this case, after whitelisting the endpoints, the heartbeat data was successfully received for the VM.

    Resources:

    Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments

Your answer

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