Hi @Ishan Saxena ,
To remove the Log Analytics agent from an Azure VM, you can follow these steps:
- Sign in to the Azure portal.
- In the Azure portal, select Virtual Machines.
- From the list, select the VM that has the Log Analytics agent installed.
- On the left, select Extensions. On the Extensions page, select the Log Analytics agent extension.
- On the extension properties page, select Uninstall.
After you have uninstalled the Log Analytics agent, you should verify that no Log Analytics agents are still connected to your Log Analytics workspace. To do this, you can run a log query in Log Analytics. This query will show the last heartbeat for each computer. If a computer has both agents, it will return two records, each with a different category
. The Azure Monitor agent will have a category
of Azure Monitor Agent. The Log Analytics agent will have a category
of Direct Agent. If you find that there are still machines with both agents sending data to your Log Analytics workspace, you should remove the Log Analytics agent from those machines to avoid duplicate data and extra ingestion costs.
References: