@Deshpande Amit Sudhir , Thank you for the question.
As mentioned by Sam in the answer, you could use the "Log Analytics Extension" to install the Log Analytics agent on Linux VMs. However, note that "the Log Analytics agent is on a deprecation path and won't be supported after August 31, 2024". For more details, see Log Analytics agent overview.
Therefore, I would recommend using "Azure Monitor Agent". It is easy to configure/maintain for Azure as well as non-Azure VM (On Prem or other cloud hosted). The logs and metrics from both agents (LA and AMA) is stored in Log Analytics workspace therefore, you can use similar workflow to query/analyze the data. More details about installation and data collection can be seen in the links below:
- Manage Azure Monitor Agent
- Collect events and performance counters from virtual machines with Azure Monitor Agent
- Collect text logs with Azure Monitor Agent
- Forward syslog data to a Log Analytics workspace
Hope this helps.
If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.