Troubleshoot the Log Analytics VM extension in Azure Monitor
This article provides help troubleshooting errors you might experience with the Log Analytics VM extension for Windows and Linux virtual machines running on Azure. The article suggests possible solutions to resolve them.
To verify the status of the extension:
Sign in to the Azure portal.
In the portal, select All services. In the list of resources, enter virtual machines. As you begin typing, the list filters based on your input. Select Virtual machines.
In your list of virtual machines, find and select it.
On the virtual machine, select Extensions.
From the list, check to see if the Log Analytics extension is enabled or not. For Linux, the agent is listed as OMSAgentforLinux. For Windows, the agent is listed as MicrosoftMonitoringAgent.
Select the extension to view details.
Troubleshoot the Azure Windows VM extension
If the Microsoft Monitoring Agent VM extension isn't installing or reporting, perform the following steps to troubleshoot the issue:
- Check if the Azure VM agent is installed and working correctly by using the steps in KB 2965986:
- You can also review the VM agent log file
C:\WindowsAzure\logs\WaAppAgent.log
. - If the log doesn't exist, the VM agent isn't installed.
- Install the Azure VM Agent.
- You can also review the VM agent log file
- Review the Microsoft Monitoring Agent VM extension log files in
C:\Packages\Plugins\Microsoft.EnterpriseCloud.Monitoring.MicrosoftMonitoringAgent
. - Ensure the virtual machine can run PowerShell scripts.
- Ensure permissions on C:\Windows\temp haven't been changed.
- View the status of the Microsoft Monitoring Agent by entering
(New-Object -ComObject 'AgentConfigManager.MgmtSvcCfg').GetCloudWorkspaces() | Format-List
in an elevated PowerShell window on the virtual machine. - Review the Microsoft Monitoring Agent setup log files in
C:\WindowsAzure\Logs\Plugins\Microsoft.EnterpriseCloud.Monitoring.MicrosoftMonitoringAgent\1.0.18053.0\
. This path changes based on the version number of the agent.
For more information, see Troubleshooting Windows extensions.
Troubleshoot the Linux VM extension
Note
As part of the ongoing transition from Microsoft Operations Management Suite to Azure Monitor, the Operations Management Suite Agent for Windows or Linux will be referred to as the Log Analytics agent for Windows and Log Analytics agent for Linux.
If the Log Analytics agent for Linux VM extension isn't installing or reporting, perform the following steps to troubleshoot the issue:
- If the extension status is Unknown, check if the Azure VM agent is installed and working correctly by reviewing the VM agent log file
/var/log/waagent.log
.- If the log doesn't exist, the VM agent isn't installed.
- Install the Azure VM Agent on Linux VMs.
- For other unhealthy statuses, review the Log Analytics agent for Linux VM extension logs files in
/var/log/azure/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux/*/extension.log
and/var/log/azure/Microsoft.EnterpriseCloud.Monitoring.OmsAgentForLinux/*/CommandExecution.log
. - If the extension status is healthy but data isn't being uploaded, review the Log Analytics agent for Linux log files in
/var/opt/microsoft/omsagent/log/omsagent.log
.
Next steps
For more troubleshooting guidance related to the Log Analytics agent for Linux, see Troubleshoot issues with the Log Analytics agent for Linux.