Hello @Azure-learning ,
Thanks for your post! I just wanted to clarify in case there is any confusion on the 2 previous answers that they are in fact both correct. In this case, given that Microsoft Monitoring Agent (MMA) does not support multiple log analytics workspaces in Linux, per the note by @Manu Philip above we know that would not be appropriate for your scenario.
However, the Azure Microsoft Agent (AMA) does in fact support dual homing in Linux as indicated by @Andrew Blumhardt .
An important deadline to note, is that the legacy Log Analytics agent will be deprecated by August 2024. Migrate to Azure Monitor agent before August 2024 to continue ingesting data. You can reference the following document here for more information on how to perform the migration.
In addition, I have included the following document referenced here for a side-by-side comparison between the AMA and Log Analytics Agent.
Please let us know if this helps answer your questions and we are more than happy to assist you further.
Thanks!
Carlos V.
----------
Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.