An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
Hi @Sandip Khadka The Azure Monitor Agent (AMA) stuck in a Transitioning state, which can prevent subsequent uninstall or reinstall operations from completing successfully. This typically indicates that the extension provisioning process has not reached a terminal state and Azure is still tracking an in-progress extension operation.
To further troubleshoot please check the following:
Verify the current extension status
- Navigate to VM > Extensions + Applications in the Azure portal.
- Confirm whether AzureMonitorWindowsAgent or AzureMonitorLinuxAgent has moved to Provisioning succeeded and is no longer showing Transitioning, Creating, or Deleting.
Collect AMA extension logs
Review the latest log files for provisioning failures, authentication issues, IMDS connectivity problems, or repeated retry attempts.
Run the AMA Troubleshooter (Windows)
- Microsoft provides a built-in AMA Troubleshooter that can help identify common deployment and configuration issues.
- Please share the generated report if any failures are detected.
Validate Data Collection Rule (DCR) associations
- If the VM remains associated with a DCR, AMA may be automatically redeployed after removal.
- Verify whether the VM is still listed under any DCR resources and remove the association if the goal is to permanently uninstall AMA.
- Microsoft has documented scenarios where DCR associations cause AMA to be re-created after deletion.
Verify Managed Identity and IMDS connectivity
- AMA relies on managed identity and access to the Instance Metadata Service (IMDS) for configuration retrieval.
- Any connectivity or authentication issues can cause the extension to remain in a non-terminal provisioning state.
Confirm no extension operation is still pending
- If Azure still reports an extension operation in progress, wait for it to complete before attempting another uninstall or install operation.
- Extension operation serialization can prevent additional actions while a previous operation is still active.
Validate end-to-end functionality
- If AMA is successfully installed, confirm that monitoring data (Heartbeat, Performance Counters, Events, Syslog, etc.) is flowing to the configured Log Analytics workspace.
- This is the best indicator that the agent is healthy.
Reference Document:
Troubleshoot Azure Monitor Agent on Windows VMs
Troubleshoot Azure Monitor Agent on Linux VMs
Azure Monitor Agent Troubleshooter for Windows
Install and Manage Azure Monitor Agent
Data Collection Rules (DCR) Overview https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/data-collection-rule-overview
If you have further questions regarding this answer, feel free to click Comment. If you find the answer helpful, please click upvote. This helps the community by allowing others with similar queries to easily find the solution.