Installing AzureMonitoringAgent and linking it to your Log Analytics Workspace
The current Service Fabric clusters are currently equipped with the MicrosoftMonitoringAgent (MMA) as the default installation. However, it is essential to note that MMA will be deprecated in August 2024, for more details refer- We're retiring the Log Analytics agent in Azure Monitor on 31 August 2024 | Azure updates | Microsoft Azure. Therefore, if you are currently utilizing MMA, it is imperative to initiate the migration process to AzureMonitoringAgent (AMA).
Installation and Linking of AzureMonitoringAgent to a Log Analytics Workspace:
- Create a Log Analytics Workspace (if not already established):
- Access the Azure portal and search for "Log Analytics Workspace."
- Proceed to create a new Log Analytics Workspace.
- Ensure that you select the identical resource group and geographical region where your cluster is located.
- Detailed explanation: Create Log Analytics workspaces - Azure Monitor | Microsoft Learn
- Create Data Collection Rules:
- Access the Azure portal and search for "Data Collection Rules (DCR)”.
- Select the same resource group and region as of your cluster.
- In Platform type, select the type of instance you have like Windows, Linux or both.
- You can leave data collection endpoint as blank.
- In the resources section, add the Virtual machine Scale Set (VMSS) resource which is attached to the Service fabric cluster.
- In the "Collect and deliver" section, click on Add data source and add both Performance Counters and Windows Event Logs one by one.
- Choose the destination for both the data sources as Azure Monitor Logs and in the Account or namespace dropdown, select the name of the Log Analytics workspace that we have created in step 1 and click on Add data source.
- Next click on review and create.
- Note: - For more detailed explanation on how to create DCR and various ways of creating it, you can follow - Collect events and performance counters from virtual machines with Azure Monitor Agent - Azure Monitor | Microsoft Learn
- Adding the VMSS instances resource with DCR:
- Once the DCR is created, in the left panel, click on Resources.
- Check if you can see the VMSS resource that we have added while creating DCR or not.
- If not then, click on "Add" and navigate to the VMSS attached to service fabric cluster and click on Apply.
- Refresh the resources tab to see whether you can see VMSS in the resources section or not. If not, try adding a couple of times if needed.
- Querying Logs and Verifying AzureMonitoringAgent Setup:
- Please allow for 10-15 minutes waiting period before proceeding. After this time has elapsed, navigate to your Log Analytics workspace, and access the 'Logs' section by scrolling through the left panel.
- Run your queries to see the logs. For example, query to check the heartbeat of all instances:Heartbeat | where Category contains "Azure Monitor Agent" | where OSType contains "Windows"
- You will see the logs there in the bottom panel as shown in the above screenshot. Also, you can modify the query as per your requirement.
- For more details related to Log Analytics queries, you can refer- Log Analytics tutorial - Azure Monitor | Microsoft Learn
- Perform the uninstallation of the MicrosoftMonitoringAgent (MMA): Once you have verified that the logs are getting generated, you can go to Virtual Machine Scale Set and then to the "Extensions + applications" section and delete the old MMA extension from VMSS.
Published on:
Learn moreRelated posts
This Month in Azure Static Web Apps | 09/2024
We are back with another edition of the Azure Static Web Apps Community! :party_popper: September was yet another month ...
IPv6 Adoption: Enhancing Azure WAF on Front Door
The transition to IPv6 is a significant step for enterprise corporations, reflecting the evolution of internet technology and the need for a l...
Introducing the Data-Bound Reference Layer in Azure Maps Visual for Power BI
Imagine managing a nationwide sales team and needing to understand how your sales align with factors like population density, competitor locat...
GitHub Copilot for Azure: 6 Must-Try Features
As developers, we are constantly seeking tools that streamline our workflows and boost productivity. … Enter GitHub Copilot for Azure, now in ...
Unlocking the Best of Azure with AzureRM and AzAPI Providers
With the recent release of AzAPI 2.0, Azure offers two powerful Terraform providers to meet your infrastructure needs: AzureRM and AzAPI. The ...
Azure Communication Services Ideas Board: Share your feedback with the product team
Innovation is not a solitary pursuit, and we recognize that some of the best ideas come from you, our Azure Communication Services community. ...
Engage with the Azure Community Services Ideas Board: Your Voice Matters
Innovation is not a solitary pursuit, and we recognize that some of the best ideas come from you, our Azure Communication Services community. ...
Optimizing custom copilot (agent) performance with Azure Load Testing: A comprehensive guide
As we move into the next phase of digital transformation, the role of custom copilots is set to become increasingly pivotal. By leveragin...
Azure Storage - TLS 1.0 and 1.1 retirement
Overview TLS 1.0 and 1.1 retirement on Azure Storage was previously announced for Nov 1st, 2024, and it was postponed recently to 1 year later...